From 79d7c2b6ea93f940be42fb17a7ac5d57fb1eddd0 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Sat, 25 Jul 2009 16:01:53 +0200 Subject: [PATCH] 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: r150082 --- gcc/ChangeLog | 4 ++-- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.old-deja/g++.law/weak.C | 1 + gcc/testsuite/gcc.dg/special/gcsec-1.c | 6 ++---- gcc/testsuite/lib/target-supports.exp | 7 +++++++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 04b556f9573b..325d99340d77 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,7 @@ 2009-07-23 Uros Bizjak 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 - + PR target/39943 * config/i386/i386.c (ix86_vectorize_builtin_conversion): Only allow conversion to signed integers. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9419deaf2067..8b518222a528 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2009-07-25 Uros Bizjak + + * 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 PR target/40809 diff --git a/gcc/testsuite/g++.old-deja/g++.law/weak.C b/gcc/testsuite/g++.old-deja/g++.law/weak.C index ea07afe4c42d..99a0f1772e55 100644 --- a/gcc/testsuite/g++.old-deja/g++.law/weak.C +++ b/gcc/testsuite/g++.old-deja/g++.law/weak.C @@ -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<<. diff --git a/gcc/testsuite/gcc.dg/special/gcsec-1.c b/gcc/testsuite/gcc.dg/special/gcsec-1.c index b76ad50aa781..ef1434fbe8b0 100644 --- a/gcc/testsuite/gcc.dg/special/gcsec-1.c +++ b/gcc/testsuite/gcc.dg/special/gcsec-1.c @@ -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 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 8604ab4050f6..c9e6826a4032 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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 { -- 2.47.2