Message ID | yddfvlp2x27.fsf@lokon.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On 04/07/2014 04:33 AM, Rainer Orth wrote: > The patch allowed i386-pc-solaris2.11 bootstraps to finish without > regressions on trunk and 4.8 branch, still need to test 4.7 branch. > > Ok for trunk, 4.8 and 4.7 branches once testing completes? > > Rainer > > > 2014-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * config/generic/asmcfi.h: Also check for > __GCC_HAVE_DWARF2_CFI_ASM. Looks fine. r~
Richard Henderson <rth@redhat.com> writes: > On 04/07/2014 04:33 AM, Rainer Orth wrote: >> The patch allowed i386-pc-solaris2.11 bootstraps to finish without >> regressions on trunk and 4.8 branch, still need to test 4.7 branch. >> >> Ok for trunk, 4.8 and 4.7 branches once testing completes? >> >> Rainer >> >> >> 2014-04-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> >> >> * config/generic/asmcfi.h: Also check for >> __GCC_HAVE_DWARF2_CFI_ASM. > > Looks fine. Testing was fine on i386-pc-solaris2.11 with /bin/as on trunk, 4.8 and 4.7 branches, as well as x86_64-unknown-linux-gnu. However, i386-pc-solaris2.11 with gas was confusing at first: for the 32-bit PIC case, no .eh_frame was generated. It turned out this happens because in this case config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT) is a lie: it claims datarel encoding for the 32-bit PIC case. This way, dwarf2out_do_cfi_asm returns false and c-family/c-cppbuiltin.c (c_cpp_builtins) doesn't define __GCC_HAVE_DWARF2_CFI_ASM. In fact, gas with cfi directives uses pcrel encoding, thus __GCC_HAVE_DWARF2_CFI_ASM should be defined. ISTM that the ASM_PREFERRED_EH_DATA_FORMAT redefinition above should be wrapped in HAVE_AS_IX86_DIFF_SECT_DELTA, but I'm quite reluctant to make such a change so late in the 4.9 release cycle. I'll certainly try it post-4.9, especially given that Solaris 9 support will be removed by then and current Solaris 10 and 11 assemblers *can* subtract symbols in different sections. Unless I'm missing something, I'm thus going to check in the patch as is within a day. I believe that losing unwind info in a single case here is worth avoiding the bootstrap failure. Rainer
# HG changeset patch # Parent e003a40e0bb68a5019d8492cec81e453514988b0 Check if GCC uses assembler cfi support diff --git a/libitm/config/generic/asmcfi.h b/libitm/config/generic/asmcfi.h --- a/libitm/config/generic/asmcfi.h +++ b/libitm/config/generic/asmcfi.h @@ -24,7 +24,7 @@ #include "config.h" -#ifdef HAVE_AS_CFI_PSEUDO_OP +#if defined(HAVE_AS_CFI_PSEUDO_OP) && defined(__GCC_HAVE_DWARF2_CFI_ASM) #define cfi_startproc .cfi_startproc #define cfi_endproc .cfi_endproc @@ -50,4 +50,4 @@ #define cfi_restore(r) #define cfi_undefined(r) -#endif /* HAVE_AS_CFI_PSEUDO_OP */ +#endif /* HAVE_AS_CFI_PSEUDO_OP && __GCC_HAVE_DWARF2_CFI_ASM */