This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/47558] 163267 breaks exception traceback in xplor-nih
- From: "iains at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 1 Feb 2011 18:07:33 +0000
- Subject: [Bug target/47558] 163267 breaks exception traceback in xplor-nih
- Auto-submitted: auto-generated
- References: <bug-47558-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47558
--- Comment #23 from Iain Sandoe <iains at gcc dot gnu.org> 2011-02-01 17:28:36 UTC ---
(In reply to comment #22)
> My only comment is that the likely users of FSF gcc are also likely builders of
> ported unix code. So gcc 4.6 needs a big fat warning that existing ported unix
> code will have to be vetted for the use of flat-namespace and the linkages
> manually adjusted. Otherwise will users of gcc 4.6 will unknowingly miscompile
> lots of existing unix code. Since we don't link this way in gcc 4.5, I don't
> see why we can't just revert the behavior and postpone this change until gcc
> 4.7 when it can be more carefully done.
I am concerned that we push the balloon in one place and it pops out in
another.
We have made a lot of effort to avoid libSystem linkage before the ext to avoid
other reported issues with unwinding and Java IIRC. I am not too keen simply
to go round in circles (we need proper fixes, of course).
This might be a reasonable compromise until the proper fixes are forthcoming:
Index: gcc/config/darwin.h
===================================================================
--- gcc/config/darwin.h (revision 169490)
+++ gcc/config/darwin.h (working copy)
@@ -327,12 +331,16 @@ extern GTY(()) int darwin_ms_struct;
"%{static-libgcc|static: -lgcc_eh -lgcc; \
shared-libgcc|fexceptions|fgnu-runtime: \
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_s.10.4) \
- %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
+ %{flat_namespace: \
+ %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \
+ :%:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)}\
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
-lgcc ; \
:%:version-compare(>< 10.3.9 10.5 mmacosx-version-min= -lgcc_s.10.4) \
- %:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5) \
+ %{flat_namespace: \
+ %:version-compare(>= 10.5 mmacosx-version-min= -lgcc_s.10.5) \
+ :%:version-compare(>< 10.5 10.6 mmacosx-version-min= -lgcc_s.10.5)}\
%:version-compare(!> 10.5 mmacosx-version-min= -lgcc_ext.10.4) \
%:version-compare(>= 10.5 mmacosx-version-min= -lgcc_ext.10.5) \
-lgcc }"