]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc/testsuite:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jun 2010 21:11:54 +0000 (21:11 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jun 2010 21:11:54 +0000 (21:11 +0000)
* lib/target-supports.exp (check_effective_target_gas): New proc.
* gcc.c-torture/execute/960321-1.x: New file.

gcc:
* doc/sourcebuild.texi (Effective-Target Keywords, Other
attributes): Document gas.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160405 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 181781e3fdbfbff5350d1d2f189932dbd3fcfc3e..acec1c72180c0810b3bfbba98f68f2dfacdd5424 100644 (file)
@@ -1,3 +1,8 @@
+2010-06-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       * doc/sourcebuild.texi (Effective-Target Keywords, Other
+       attributes): Document gas.
+
 2010-06-07  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (*add<mode>_1): Remove alternative 2.
index c4353c790c55a04e54419a690dfd08e3b4873fa8..cb116a93f572927f8578525c7c97fe35341088c0 100644 (file)
@@ -1734,6 +1734,9 @@ Target supports @option{-freorder-blocks-and-partition}.
 @item fstack_protector
 Target supports @option{-fstack-protector}.
 
+@item gas
+Target uses GNU @command{as}.
+
 @item gc_sections
 Target supports @option{--gc-sections}.
 
index 50afa0dd51de80965f4888a96d8317c6d1c28169..cfc229f4d395431ba8fc7825b2f7ef4cf51b365f 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2010-06-07  Jason Merrill  <jason@redhat.com>
 
        PR c++/44401
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 6ad8c344585e0134c7b3ebd132e7e8cf73ba5243..1cdc53b49835408571c109933f5611f803ad94dd 100644 (file)
@@ -3333,6 +3333,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 compiler has been configure with link-time optimization
 # (LTO) support.