]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: i386.exp (FLAGS): Remove.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 8 Nov 2010 15:58:23 +0000 (15:58 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 8 Nov 2010 15:58:23 +0000 (15:58 +0000)
Backport from mainline:
2010-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* gcc.target/i386/i386.exp (FLAGS): Remove.
Wrap gcc_target_compile with $clearcap_ldflags added to options.

From-SVN: r166437

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/i386.exp

index f30ea4480ba60321f0e42a3a5d32f14dcd1b47f8..9aa5983c5562dbd437f19d91f38e9ac221ae4c16 100644 (file)
@@ -1,3 +1,11 @@
+2010-11-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2010-11-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * gcc.target/i386/i386.exp (FLAGS): Remove.
+       Wrap gcc_target_compile with $clearcap_ldflags added to options.
+
 2010-11-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
        Backport from mainline:
index 30bb376c1a2fd3b98c013b123d086300fa5183e4..22e26dbc741e892f4dd026cef208805b74b1a747 100644 (file)
@@ -161,13 +161,24 @@ proc check_effective_target_sse5 { } {
 
 # If the linker used understands -M <mapfile>, pass it to clear hardware
 # capabilities set by the Sun assembler.
-set FLAGS ""
 set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
 
 if [check_no_compiler_messages mapfile executable {
        int main (void) { return 0; }
   } $clearcap_ldflags ] {
-  set FLAGS $clearcap_ldflags
+
+  if { [info procs gcc_target_compile] != [list] \
+       && [info procs saved_gcc_target_compile] == [list] } {
+    rename gcc_target_compile saved_gcc_target_compile
+
+    proc gcc_target_compile { source dest type options } {
+      global clearcap_ldflags
+      # Always pass -Wl,-M,<mapfile>, but don't let it show up in gcc.sum.
+      lappend options "additional_flags=$clearcap_ldflags"
+
+      return [saved_gcc_target_compile $source $dest $type $options]
+    }
+  }
 }
 
 # If a testcase doesn't have special options, use these.
@@ -194,7 +205,7 @@ set tests [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]]
 set tests [prune $tests $srcdir/$subdir/vect-args.c]
 
 # Main loop.
-dg-runtest $tests $FLAGS $DEFAULT_CFLAGS
+dg-runtest $tests "" $DEFAULT_CFLAGS
 
 # All done.
 dg-finish