]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: clearcap.map: New file.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 21 Jun 2010 17:21:31 +0000 (17:21 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 21 Jun 2010 17:21:31 +0000 (17:21 +0000)
Backport from mainline:
2010-03-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* gcc.target/i386/clearcap.map: New file.
* gcc.target/i386/i386.exp: Check for linker -M mapfile support.
Pass clearcap.map by default if supported.

From-SVN: r161103

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/clearcap.map [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/i386.exp

index 47cf0c5f91ea956ba300fce685df20771a84dc66..0dc5f0be54ab89cb1ab74d363086ad6ea3f54245 100644 (file)
@@ -1,3 +1,12 @@
+2010-06-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2010-03-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * gcc.target/i386/clearcap.map: New file.
+       * gcc.target/i386/i386.exp: Check for linker -M mapfile support.
+       Pass clearcap.map by default if supported.
+
 2010-06-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        Backport from mainline:
diff --git a/gcc/testsuite/gcc.target/i386/clearcap.map b/gcc/testsuite/gcc.target/i386/clearcap.map
new file mode 100644 (file)
index 0000000..147f922
--- /dev/null
@@ -0,0 +1,3 @@
+# clear all hardware capabilities emitted by Sun as: the tests here
+# guard against execution at runtime
+hwcap_1 = V0x0 OVERRIDE;
index a048f4c08d063ff4e80cfeebbe5490ee24f6f44a..30bb376c1a2fd3b98c013b123d086300fa5183e4 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 1997, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1997, 2004, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -158,6 +159,17 @@ proc check_effective_target_sse5 { } {
     } "-O2 -msse5" ]
 }
 
+# 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 a testcase doesn't have special options, use these.
 global DEFAULT_CFLAGS
 if ![info exists DEFAULT_CFLAGS] then {
@@ -182,7 +194,7 @@ set tests [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]]
 set tests [prune $tests $srcdir/$subdir/vect-args.c]
 
 # Main loop.
-dg-runtest $tests "" $DEFAULT_CFLAGS
+dg-runtest $tests $FLAGS $DEFAULT_CFLAGS
 
 # All done.
 dg-finish