Message ID | yddzi4wg5cz.fsf@CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
Series | [build] Disable SHF_MERGE on Solaris 10/x86 (PR bootstrap/84017) | expand |
On Mon, Jan 29, 2018 at 02:30:04PM +0100, Rainer Orth wrote: > --- a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c > +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c > @@ -4,8 +4,7 @@ > as well. */ > /* { dg-do compile } */ > /* { dg-options "-O2 -gdwarf -dA -fdebug-prefix-map=a=b" } */ > -/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" { target { { { ! *-*-solaris2* } || gas } && { { ! hppa*64*-*-* } && { ! powerpc-ibm-aix* } } } } } } */ > -/* { dg-final { scan-assembler "\"GNU C\[^\\n\\r\]+ DW_AT_producer" { target { { *-*-solaris2* && { ! gas } } || { hppa*64*-*-* } } } } } */ > +/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C|\"GNU C\[^\\n\\r\]+ DW_AT_producer" } } */ > /* { dg-final { scan-assembler-not "debug-prefix-map" } } */ In this case, even better would be to add -fno-merge-debug-strings to dg-options and scan for just one pattern. Jakub
Hi Jakub, > On Mon, Jan 29, 2018 at 02:30:04PM +0100, Rainer Orth wrote: >> --- a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c >> +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c >> @@ -4,8 +4,7 @@ >> as well. */ >> /* { dg-do compile } */ >> /* { dg-options "-O2 -gdwarf -dA -fdebug-prefix-map=a=b" } */ >> -/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" { target { { { ! *-*-solaris2* } || gas } && { { ! hppa*64*-*-* } && { ! powerpc-ibm-aix* } } } } } } */ >> -/* { dg-final { scan-assembler "\"GNU C\[^\\n\\r\]+ DW_AT_producer" { target { { *-*-solaris2* && { ! gas } } || { hppa*64*-*-* } } } } } */ >> +/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C|\"GNU C\[^\\n\\r\]+ DW_AT_producer" } } */ >> /* { dg-final { scan-assembler-not "debug-prefix-map" } } */ > > In this case, even better would be to add > -fno-merge-debug-strings > to dg-options and scan for just one pattern. that's even simpler, thanks for the hint. Revised patch tested as before. Rainer
# HG changeset patch # Parent 1d4d7906b123d09089bb93d9833791c855b52578 Disable SHF_MERGE on Solaris 10/x86 (PR bootstrap/84017) diff --git a/gcc/configure.ac b/gcc/configure.ac --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2954,6 +2954,14 @@ if test $gcc_cv_as_shf_merge = no; then [elf,2,12,0], [--fatal-warnings], [.section .rodata.str, "aMS", %progbits, 1]) fi +case "$target" in + i?86-*-solaris2.10* | x86_64-*-solaris2.10*) + # SHF_MERGE support in Solaris 10/x86 ld is broken. + if test x"$gnu_ld" = xno; then + gcc_cv_as_shf_merge=no + fi + ;; +esac AC_DEFINE_UNQUOTED(HAVE_GAS_SHF_MERGE, [`if test $gcc_cv_as_shf_merge = yes; then echo 1; else echo 0; fi`], [Define 0/1 if your assembler supports marking sections with SHF_MERGE flag.]) diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c --- a/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c +++ b/gcc/testsuite/gcc.dg/debug/dwarf2/prod-options.c @@ -4,8 +4,7 @@ as well. */ /* { dg-do compile } */ /* { dg-options "-O2 -gdwarf -dA -fdebug-prefix-map=a=b" } */ -/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" { target { { { ! *-*-solaris2* } || gas } && { { ! hppa*64*-*-* } && { ! powerpc-ibm-aix* } } } } } } */ -/* { dg-final { scan-assembler "\"GNU C\[^\\n\\r\]+ DW_AT_producer" { target { { *-*-solaris2* && { ! gas } } || { hppa*64*-*-* } } } } } */ +/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C|\"GNU C\[^\\n\\r\]+ DW_AT_producer" } } */ /* { dg-final { scan-assembler-not "debug-prefix-map" } } */ void func (void)