Commit 011a3198 by Uros Bizjak

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
parent 9618fb3c
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
2009-07-23 Uros Bizjak <ubizjak@gmail.com> 2009-07-23 Uros Bizjak <ubizjak@gmail.com>
PR target/40832 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. ASM_SHORT instead of .word.
* config/i386/i386.md (*tls_global_dynamic_64): Use ASM_SHORT * config/i386/i386.md (*tls_global_dynamic_64): Use ASM_SHORT
instead of .word in asm template. instead of .word in asm template.
...@@ -286,8 +286,8 @@ ...@@ -286,8 +286,8 @@
* ira.c (setup_cover_and_important_classes): Don't setup * ira.c (setup_cover_and_important_classes): Don't setup
ira_important_class_nums. Add cover classes to the end of ira_important_class_nums. Add cover classes to the end of
important classes. important classes.
(cover_class_order, comp_reg_classes_func, (cover_class_order, comp_reg_classes_func, reorder_important_classes):
reorder_important_classes): New. New.
(find_reg_class_closure): Use reorder_important_classes. (find_reg_class_closure): Use reorder_important_classes.
* config/i386/i386.h (IRA_COVER_CLASSES): Remove. * config/i386/i386.h (IRA_COVER_CLASSES): Remove.
......
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> 2009-07-25 Janus Weil <janus@gcc.gnu.org>
PR fortran/39630 PR fortran/39630
......
// { dg-do link { target i?86-*-linux* x86_64-*-linux* } } // { dg-do link { target i?86-*-linux* x86_64-*-linux* } }
// { dg-require-effective-target static }
// { dg-options "-static" } // { dg-options "-static" }
// Bug: g++ fails to instantiate operator<<. // Bug: g++ fails to instantiate operator<<.
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
/* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */ /* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */
/* { dg-require-gc-sections "" } */ /* { dg-require-gc-sections "" } */
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" } */ /* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" } */
/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target native } } */ /* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target static } } */
/* 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] } } */
#include <stdlib.h> #include <stdlib.h>
......
...@@ -625,6 +625,13 @@ proc check_effective_target_pe_aligned_commons {} { ...@@ -625,6 +625,13 @@ proc check_effective_target_pe_aligned_commons {} {
return 0 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 # Return 1 if the target supports -fstack-protector
proc check_effective_target_fstack_protector {} { proc check_effective_target_fstack_protector {} {
return [check_runtime fstack_protector { return [check_runtime fstack_protector {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment