target-supports.exp (check_effective_target_static): New procedure.

* 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: r150080
This commit is contained in:
Uros Bizjak 2009-07-25 15:45:02 +02:00
parent 9618fb3c1b
commit 011a31984d
5 changed files with 21 additions and 7 deletions

View File

@ -272,7 +272,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.
@ -286,8 +286,8 @@
* 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.

View 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

View 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<<.

View 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>

View 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 {