[CMake] Regression between 2.4.8 and 2.6.2 for the macada version of the gcc compiler
Martin Costabel
costabel at wanadoo.fr
Wed Jan 28 18:31:08 EST 2009
Alan W. Irwin wrote:
[]
> Is there a better gcc option then -v to find out the _actual_ linker being
> used?
Use -Wl,-v :-)
On 10.4, if you run gcc -dynamiclib, the linking is managed by
/usr/bin/libtool which in turn calls /usr/bin/ld, and /usr/bin/libtool
understands the -current_version flag. On the other hand, /usr/bin/ld
does not understand "-current_version", it wants
"-dylib_current_version", which it gets fed by /usr/bin/libtool, but
"-dylib_current_version" is not understood by /usr/bin/libtool. Clear? ;-)
I suspect the ada/gcc compiler calls ld directly without passing through
/usr/bin/libtool. If this is true, changing "-current_version" to
"-dylib_current_version" should solve the problem. But this won't work
for Apple's /usr/bin/gcc on 10.4.
On 10.5, gcc -dynamiclib calls collect2 which calls ld, and both
collect2 and /usr/bin/ld understand both "-dylib_current_version" and
"-current_version".
--
Martin
More information about the CMake
mailing list