]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: target-supports.exp (check_effective_target_gas): New proc.
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Mon, 21 Jun 2010 15:59:01 +0000 (15:59 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Mon, 21 Jun 2010 15:59:01 +0000 (15:59 +0000)
Backport from mainline:
2010-06-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

* lib/target-supports.exp (check_effective_target_gas): New proc.
* gcc.c-torture/execute/960321-1.x: New file.

2009-10-03  Ben Elliston  <bje@au.ibm.com>
    Janis Johnson  <janis187@us.ibm.com>
         Diego Novillo  <dnovillo@google.com>

* lib/c-torture.exp: Load target-supports.exp.

From-SVN: r161090

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/960321-1.x [new file with mode: 0644]
gcc/testsuite/lib/c-torture.exp
gcc/testsuite/lib/target-supports.exp

index b504a89aa6a4964a51fd9d291d1694ece870d192..47cf0c5f91ea956ba300fce685df20771a84dc66 100644 (file)
@@ -1,3 +1,17 @@
+2010-06-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       Backport from mainline:
+       2010-06-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * lib/target-supports.exp (check_effective_target_gas): New proc.
+       * gcc.c-torture/execute/960321-1.x: New file.
+
+       2009-10-03  Ben Elliston  <bje@au.ibm.com>
+                   Janis Johnson  <janis187@us.ibm.com>
+                   Diego Novillo  <dnovillo@google.com>
+
+       * lib/c-torture.exp: Load target-supports.exp.
+
 2010-06-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.c-torture/execute/960321-1.x b/gcc/testsuite/gcc.c-torture/execute/960321-1.x
new file mode 100644 (file)
index 0000000..44cc702
--- /dev/null
@@ -0,0 +1,15 @@
+# This test fails to link on 64-bit Solaris 2/x86 due to a Sun as bug.
+if { [istarget "i?86-*-solaris2*"]
+     && ! [check_effective_target_ilp32]
+     && ! [check_effective_target_gas] } { 
+    set torture_eval_before_compile {
+        global compiler_conditional_xfail_data
+        set compiler_conditional_xfail_data {
+            "64-bit Sun as bug" \
+                { "i?86-*-solaris2*" } \
+                { "-O[1-3s]" } \
+                { "" }
+       }
+    }
+}
+return 0
index 769ec97d3eccfd8cdd82f6cd19036901f1c41bea..5c85997b974325b3fd10b20f9e2734b85baecb7f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008
+# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008, 2010
 # Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,6 +17,7 @@
 
 # This file was written by Rob Savoye. (rob@cygnus.com)
 
+load_lib target-supports.exp
 load_lib file-format.exp
 load_lib target-libpath.exp
 
index 515ab614a092cce5e4b40d15c5e1746fb0aa06e3..1de3760d53d26493c55b662619aa5954597819ab 100644 (file)
@@ -2929,6 +2929,28 @@ proc check_effective_target_correct_iso_cpp_string_wchar_protos { } {
     }]
 }
 
+# Return 1 if GNU as is used.
+
+proc check_effective_target_gas { } {
+    global use_gas_saved
+    global tool
+
+    if {![info exists use_gas_saved]} {
+       # Check if the as used by gcc is GNU as.
+       set gcc_as [lindex [${tool}_target_compile "-print-prog-name=as" "" "none" ""] 0]
+       # Provide /dev/null as input, otherwise gas times out reading from
+       # stdin.
+       set status [remote_exec host "$gcc_as" "-v /dev/null"]
+       set as_output [lindex $status 1]
+       if { [ string first "GNU" $as_output ] >= 0 } {
+           set use_gas_saved 1
+       } else {
+           set use_gas_saved 0
+       }
+    }
+    return $use_gas_saved
+}
+
 # Return 1 if the language for the compiler under test is C.
 
 proc check_effective_target_c { } {