Re: Make build with static library on 10.4
Re: Make build with static library on 10.4
- Subject: Re: Make build with static library on 10.4
- From: Andy Wiese <email@hidden>
- Date: Tue, 11 May 2010 11:25:48 -0500
On May 11, 2010, at 4:19 AM, Jonas Maebe wrote:
On 11 May 2010, at 09:10, Andy Wiese wrote:
I'm sure there is a very small audience for workarounds to
makefiles for 10.4, but for the sake of the archives, here is the
solution I found, and it was absolutely painful.
I got it to work in Xcode, then did a reverse engineer of the Xcode
build commands grabbed from the build results window. What I found
is that linking would break if I included the object files in a
particular order. This does not happen on 10.5, 10.6 or FreeBSD, so
I assume this must be a bug that was fixed along the way.
It's not a bug per se. The problem was that the Xcode linker
processed the object files and static libraries on the command line
once and in order. When encountering a static library, it would only
link those object files from the library that contained definitions
for external symbols encountered up to that point. This was
documented behaviour and afaik there are more linkers out there with
this behaviour (possibly even older versions of GNU ld).
The linker was indeed changed in 10.5 to keep resolving undefined
symbols in all object files and libraries until no new ones are
found anymore.
Jonas
Thanks that's nice to know. I have never encountered that situation
before, probably just by chance.
Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden