Patchwork [testsuite] Add -gdwarf to debug/dwarf2 testcases (Take 2)

login
register
mail settings
Submitter Senthil Kumar Selvaraj
Date April 29, 2013, 1:33 p.m.
Message ID <20130429133303.GB6777@atmel.com>
Download mbox | patch
Permalink /patch/240370/
State New
Headers show

Comments

Senthil Kumar Selvaraj - April 29, 2013, 1:33 p.m.
This patch adds -gdwarf to the flags passed to all tests run by
dwarf2.exp. In the first attempt, I'd added the flag to dg-options in
individual testcases. Jakub then suggested adding it to the exp file
instead.

Does this look ok? If yes, could someone commit please, I don't have
commit access.

Regards
Senthil

gcc/testsuite/ChangeLog

2013-04-29  Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>

	* gcc.dg/debug/dwarf2/dwarf2.exp: Replace -gdwarf-2 with -gdwarf and
	force -gdwarf when invoking dg-runtest.

Patch

diff --git gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index 829840c..f161787 100644
--- gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
+++ gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
@@ -22,7 +22,7 @@  load_lib gcc-dg.exp
 # If a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
-    set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf-2"
+    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
 }
 
 # Initialize `dg'.
@@ -31,12 +31,12 @@  dg-init
 # Main loop.
 set comp_output [gcc_target_compile \
     "$srcdir/$subdir/../trivial.c" "trivial.S" assembly \
-    "additional_flags=-gdwarf-2"]
+    "additional_flags=-gdwarf"]
 if { ! [string match "*: target system does not support the * debug format*" \
     $comp_output] } {
     remove-build-file "trivial.S"
     dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\] $srcdir/c-c++-common/dwarf2/*.c]] \
-	    "" $DEFAULT_CFLAGS
+	    " -gdwarf " $DEFAULT_CFLAGS
 }
 
 # All done.