This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR libitm/55693


   The attached patch eliminates the failure of the libitm.c++/eh-1.C execution test on darwin10
and later, PR55693. With the introduction of c++ weak-symbol coalescing in Mac OS X 10.6, dyld no
longer looks up weak symbols that reside in object files rather than shared libraries. This prevents
weak symbols for the dummy functions in libgcc/config/darwin-crt-tm.c from being replaced by those
in the libstdc++ shared library. The solution is not to define these dummy symbols when targeting
Mac OS X 10.6 or later (where the tool chain properly handles undefined weak refs in the linker).
Tested on x86_64-apple-darwin10 with Xcode 3.2.6, x86_64-apple-darwin11 and x86_64-apple-darwin12
with Xcode 4.5.2/4.6. Note that this fix requires functional dynamic lookup of undefined symbols
which is broken for the buggy linkers in Xcode 4.2 up to but not including Xcode 4.4 due to
radr://10466868. Since the Xcode 4.x was only briefly available to 10.6 users and the libitm.c++/eh-1.C 
execution test is already broken on 10.6, they should revert to Xcode 3.2.6 to achieve the fix.
Users on 10.7 and later have access to Xcode 4.4 and later without the undefined dynamic lookup bug.
Okay for gcc trunk?
        Jack

Attachment: PR55693.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]