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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-01-28 Rainer Orth <[email protected]>
gcc/testsuite:
PR bootstrap/84017
* gcc.dg/debug/dwarf2/prod-options.c: Add -fno-merge-debug-strings
to dg-options.
Simplify DW_AT_producer scan.
gcc:
PR bootstrap/84017
* configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
* configure: Regenerate.
# HG changeset patch
# Parent 2b36ffcd7331629b3a37b6c434ad862c197fdde9
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
@@ -3,9 +3,8 @@
the build not reproducible. Other skipped options could be tested here
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-options "-O2 -gdwarf -dA -fno-merge-debug-strings -fdebug-prefix-map=a=b" } */
+/* { dg-final { scan-assembler "\"GNU C\[^\\n\\r\]+ DW_AT_producer" } } */
/* { dg-final { scan-assembler-not "debug-prefix-map" } } */
void func (void)