OSDN Git Service

* lib/target-supports.exp (check_effective_target_static): New
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jul 2009 13:45:02 +0000 (13:45 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 25 Jul 2009 13:45:02 +0000 (13:45 +0000)
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.

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

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 948f2fa..2039153 100644 (file)
 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.
        * ira.c (setup_cover_and_important_classes): Don't setup
        ira_important_class_nums.  Add cover classes to the end of
        important classes.
-       (cover_class_order, comp_reg_classes_func,
-       reorder_important_classes): New.
+       (cover_class_order, comp_reg_classes_func, reorder_important_classes):
+       New.
        (find_reg_class_closure): Use reorder_important_classes.
 
        * config/i386/i386.h (IRA_COVER_CLASSES): Remove.
index 71f3ad9..b70c78f 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-25  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/39630
index ea07afe..99a0f17 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 b76ad50..ef1434f 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 d9ec391..c847de0 100644 (file)
@@ -625,6 +625,13 @@ proc check_effective_target_pe_aligned_commons {} {
     return 0
 }
 
+# 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 {