http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47558
--- Comment #24 from Iain Sandoe <iains at gcc dot gnu.org> 2011-02-01 17:49:34 UTC --- (In reply to comment #23) > (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: well a couple of hiccups ... this seems OK on Darwin9 --- could you try D10? 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) \ + %{Zflat_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) \ + %{Zflat_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 }"