http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693



--- Comment #40 from Jack Howarth <howarth at nitro dot med.uc.edu> 2013-01-24 
14:54:34 UTC ---

(In reply to comment #39)



    My understanding from Nick's comments was that the ld64/dyld behavior is

now as follows. For performance reasons, weak coalescing is only done if the

weak symbols occur in a library (shared or static) and those symbols that are

marked weak in object files are not weak coalesced by dyld. His comments

weren't explicit on that point and I've asked him to confirm that your

work-around of using a static library for the weak symbols isn't exploiting a

'bug' in ld64/dyld that will disappear in a future Xcode release.

     I should also note that your patch does produce some regressions on

darwin10 with Xcode 4.2 but this shouldn't shock anyone as we are well aware

that -undefined dynamic_lookup was broken from Xcode 4.2 until it was fixed

again in Xcode 4.4 (radr://10466868). I wouldn't worry about this as...



1) The Xcode 4.x series was never fully supported on darwin10 and only briefly

made available to end-users. Users on darwin10 really need to stick to Xcode

3.2.6 to avoid the -undefined dynamic_lookup bug introduced at Xcode 4.2.

2) Users on darwin11/12 can use any Xcode after 4.4 which are all freely

available from Apple on connect.apple.com.



There is a limit to the number of linker bugs that can be worked around at the

same time in FSF gcc on darwin and I would focus more on those Xcode releases

which provided expected behavior rather than buggy behavior. IMHO, the current

situation is unacceptable for libitm and needs to be fixed since for all modern

(supported) darwin (10/11/12), the stub symbols in crttme.o are overriding

those in libstdc++.



ps On darwin10 with Xcode 4.2, the failures are all of the form...



dyld: Symbol not found: __ZdaPv

  Referenced from:

/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin10.8.0/i386/libitm/.libs/libitm.1.dylib

  Expected in: flat namespace

 in

/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin10.8.0/i386/libitm/.libs/libitm.1.dylib

FAIL: libitm.c/cancel.c execution test

Reply via email to