Reputation: 6707
how can I pass the option --enable-auto-import
to ld from gcc?
Upvotes: 6
Views: 6360
Reputation: 679
Caveat: It's rarely mentioned but if you have a linker option that requires a value, say ...
-current_version 1
... you need to do the following:
-Wl,-current_version,1
... or ...
-Xlinker -current_version -Xlinker 1
Upvotes: 3
Reputation: 33257
-Xlinker option
Pass option as an option to the linker. You can use this to supply system-specific
linker options which GCC does not know how to recognize.
Upvotes: 4
Reputation: 400159
You use the -Xlinker option to pass options to the linker:
$ gcc -Xlinker--enable-auto-import blah...
should work.
Upvotes: 3