Xcode 3.2 libtool, ld64
Xcode 3.2 libtool, ld64
- Subject: Xcode 3.2 libtool, ld64
- From: Jonas Maebe <email@hidden>
- Date: Fri, 04 Sep 2009 18:30:45 +0200
Hello,
The ld64 shipped with Xcode 3.2 has a bug that causes all dynamic
libraries built with our compiler to crash during library
initialisation (rdar://problem/7198997,
http://openradar.appspot.com/7198997). It is possible to work around
this bug by specifying the new -no_order_inits option to the linker.
Unfortunately, our compiler calls libtool rather than ld when
compiling shared libraries, because that's also what Apple's gcc
called at the time that I added this support. The reason that this is
unfortunate, is that Xcode 3.2's libtool does not grok the
-no_order_inits parameter. As a result, we cannot just tell our users
to instruct the compiler to pass -no_order_inits to the linker.
Hence, my questions are:
a) is libtool deprecated? Should I file a bug report against libtool
to add support for the new linker parameters? (not that it will help
me much, since I have to change the compiler anyway; I can't just tell
our users to wait until libtool has been changed)
b) what is the best backwards and forward compatible way (in terms of
"the command line can remain identical") to link dylibs? gcc nowadays
calls "collect2". Is there a reason why we should not call ld
directly? I called libtool because I thought that it might (one day)
do some extra things behind the scenes, and didn't want us to risk
suddenly breaking at that point. Obviously, that did not work out so
well.
Thanks,
Jonas
PS: as an aside, ld64 can also no longer be built by people outside
Apple, because it now depends on components that are not open source.
See http://lists.apple.com/archives/Darwin-dev/2009/Sep/msg00026.html
This is a very unfortunate evolution.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden