https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #41651|0                           |1
        is obsolete|                            |

--- Comment #54 from Iain Sandoe <iains at gcc dot gnu.org> ---
Created attachment 42198
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42198&action=edit
workaround patch

This is a workaround, to avoid Ada bootstrap breakage.

what should happen:

 - for x86-64 (m64) Darwin we should get -lSystem -lgcc_eh -lgcc -lSystem (thus
picking up the unwinder from libSystem=>libunwind.

 - for x86 (m32) we should get -lgcc_eh -lgcc -lSystem which links the unwinder
from libgcc_eh (as before).

So, the first case works around the unusable unwinder in m64 libgcc and the
second case preserves the status quo for m32.

you should be able to confirm this with some trivial code using the unwinder,
linked -static-libgcc:

(m32)

$ DYLD_PRINT_LIBRARIES=1 DYLD_PRINT_BINDINGS=1 ./t 2>&1 |grep _Un
<empty>

(m64)

$ DYLD_PRINT_LIBRARIES=1 DYLD_PRINT_BINDINGS=1 ./t 2>&1 |grep _Un
dyld: lazy bind: t:0x1044D1080 = libunwind.dylib:__Unwind_RaiseException,
*0x1044D1080 = 0x7FFF8F975918
dyld: lazy bind: t:0x1044D1068 =
libunwind.dylib:__Unwind_GetLanguageSpecificData, *0x1044D1068 = 0x7FFF8F9763D0
dyld: lazy bind: t:0x1044D1070 = libunwind.dylib:__Unwind_GetRegionStart,
*0x1044D1070 = 0x7FFF8F9763F3
dyld: lazy bind: t:0x1044D1060 = libunwind.dylib:__Unwind_GetIPInfo,
*0x1044D1060 = 0x7FFF8F97A266
dyld: lazy bind: t:0x1044D1098 = libunwind.dylib:__Unwind_SetGR, *0x1044D1098 =
0x7FFF8F9765A0
dyld: lazy bind: t:0x1044D10A0 = libunwind.dylib:__Unwind_SetIP, *0x1044D10A0 =
0x7FFF8F976760
dyld: lazy bind: t:0x1044D1050 = libunwind.dylib:__Unwind_DeleteException,
*0x1044D1050 = 0x7FFF8F9767F1

===

I bootstrapped r252936 on x86-64 Darwin15.6 (10.11.6), it would be good if
folks could check it out.

Haven't tried an i386 bootstrap.

===

As per comment #20, we really need to rationalise our libgcc/crts to suit the
range of use-cases.  I've started rebasing the patches for this...

Reply via email to