]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target-supports.exp (check_effective_target_static): New procedure.
authorUros Bizjak <ubizjak@gmail.com>
Sat, 25 Jul 2009 14:01:53 +0000 (16:01 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 25 Jul 2009 14:01:53 +0000 (16:01 +0200)
* lib/target-supports.exp (check_effective_target_static): New
procedure.
* gcc.dg/special/gcsec-1.c (dg-options): Use -static only when
supported.
* g++.old-deja/g++.law/weak.C: Require static effective target.

From-SVN: r150082

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.law/weak.C
gcc/testsuite/gcc.dg/special/gcsec-1.c
gcc/testsuite/lib/target-supports.exp

index 04b556f9573b4bc85b460d300802ee09d341f93b..325d99340d77186a28a096b3db34996973d065cb 100644 (file)
@@ -1,7 +1,7 @@
 2009-07-23  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/40832
-       * config/i386/i386.c (output_387_ffreep): Rewrite to return
+       * config/i386/i386.c (output_387_ffreep): Rewrite to use
        ASM_SHORT instead of .word.
        * config/i386/i386.md (*tls_global_dynamic_64): Use ASM_SHORT
        instead of .word in asm template.
@@ -10,7 +10,7 @@
 
        Backport from mainline:
        2009-04-29  Richard Guenther  <rguenther@suse.de>
-  
+
        PR target/39943
        * config/i386/i386.c (ix86_vectorize_builtin_conversion): Only
        allow conversion to signed integers.
index 9419deaf2067a01a239a6adabff850764bc83798..8b518222a5282f0e79c73d6f888c59212e25111d 100644 (file)
@@ -1,3 +1,11 @@
+2009-07-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       * lib/target-supports.exp (check_effective_target_static): New
+       procedure.
+       * gcc.dg/special/gcsec-1.c (dg-options): Use -static only when
+       supported.
+       * g++.old-deja/g++.law/weak.C: Require static effective target.
+
 2009-07-21  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/40809
index ea07afe4c42d7ced50056f9c117032cffeb78164..99a0f1772e557a4d7e2fd09dca2228b839693ec5 100644 (file)
@@ -1,4 +1,5 @@
 // { dg-do link { target i?86-*-linux* x86_64-*-linux* } }
+// { dg-require-effective-target static }
 // { dg-options "-static" }
 // Bug: g++ fails to instantiate operator<<.
 
index b76ad50aa781992b6ca511666d22dcc54722e5d2..ef1434fbe8b084631793a63aee8ccab3478bb692 100644 (file)
@@ -3,10 +3,8 @@
 /* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
 /* { dg-require-gc-sections "" } */
 
-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" } */
-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target native } } */
-/* Solaris 10 does not support static linking; there is no libc.a.  */
-/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" { target *-*-netware* i?86-*-solaris2.1[0-9] } } */
+/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" } */
+/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target static } } */
 
 #include <stdlib.h>
 
index 8604ab4050f66977b66e3ea37a3ae56a03d6f7c0..c9e6826a4032f4dd8afc03dfc1cbdfb617d4f586 100644 (file)
@@ -538,6 +538,13 @@ proc check_effective_target_pthread {} {
     } "-pthread"]
 }
 
+# Return 1 if the target supports -static
+proc check_effective_target_static {} {
+    return [check_no_compiler_messages static executable {
+       int main (void) { return 0; }
+    } "-static"]
+}
+
 # Return 1 if the target supports -fstack-protector
 proc check_effective_target_fstack_protector {} {
     return [check_runtime fstack_protector {