aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2012-06-20 09:17:53 +0000
committerRainer Orth <ro@gcc.gnu.org>2012-06-20 09:17:53 +0000
commit32e36d1a8343aa9efedcd08aaba7bb007f7603d5 (patch)
tree56224a2d086afa11fb96af7a4fb354e9e212da30 /gcc/testsuite
parent3e71d9533ae7f598e495c8e38e7433b119da0454 (diff)
downloadgcc-32e36d1a8343aa9efedcd08aaba7bb007f7603d5.zip
gcc-32e36d1a8343aa9efedcd08aaba7bb007f7603d5.tar.gz
gcc-32e36d1a8343aa9efedcd08aaba7bb007f7603d5.tar.bz2
Clear hwcap_2 with Sun ld
* gcc.target/i386/clearcapv2.map: New file. * gcc.target/i386/i386.exp: Try it first before clearcap.map. From-SVN: r188820
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/clearcapv2.map7
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp17
3 files changed, 26 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a3a8166..db5fe86 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/clearcapv2.map: New file.
+ * gcc.target/i386/i386.exp: Try it first before clearcap.map.
+
2012-06-19 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.dg/stack-usage-1.c: Remove dg-options line for sh targets
diff --git a/gcc/testsuite/gcc.target/i386/clearcapv2.map b/gcc/testsuite/gcc.target/i386/clearcapv2.map
new file mode 100644
index 0000000..95cb14c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/clearcapv2.map
@@ -0,0 +1,7 @@
+# clear all hardware capabilities emitted by Sun as: the tests here
+# guard against execution at runtime
+# uses mapfile v2 syntax which is the only way to clear AT_SUN_CAP_HW2 flags
+$mapfile_version 2
+CAPABILITY {
+ HW = ;
+};
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index 88ff715..785a973 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -256,12 +256,23 @@ proc check_effective_target_rtm { } {
# If the linker used understands -M <mapfile>, pass it to clear hardware
# capabilities set by the Sun assembler.
-set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
+# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
+set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcapv2.map"
-if [check_no_compiler_messages mapfile executable {
+if ![check_no_compiler_messages mapfilev2 executable {
+ int main (void) { return 0; }
+} $clearcap_ldflags ] {
+ # If this doesn't work, fall back to the less capable v1 syntax.
+ set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
+
+ if ![check_no_compiler_messages mapfile executable {
int main (void) { return 0; }
- } $clearcap_ldflags ] {
+ } $clearcap_ldflags ] {
+ unset clearcap_ldflags
+ }
+}
+if [info exists clearcap_ldflags] {
if { [info procs gcc_target_compile] != [list] \
&& [info procs saved_gcc_target_compile] == [list] } {
rename gcc_target_compile saved_gcc_target_compile