diff options
author | Uros Bizjak <uros@gcc.gnu.org> | 2009-07-25 15:45:02 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2009-07-25 15:45:02 +0200 |
commit | 011a31984dbaed1aabe358a3d7a46a239a86afb3 (patch) | |
tree | b128f10b07ee43b10c821597a326137ebbd9b386 /gcc/testsuite | |
parent | 9618fb3c1bf9bf211109d87c435804f164202bda (diff) | |
download | gcc-011a31984dbaed1aabe358a3d7a46a239a86afb3.zip gcc-011a31984dbaed1aabe358a3d7a46a239a86afb3.tar.gz gcc-011a31984dbaed1aabe358a3d7a46a239a86afb3.tar.bz2 |
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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.law/weak.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/special/gcsec-1.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 7 |
4 files changed, 18 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71f3ad9..b70c78f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 diff --git a/gcc/testsuite/g++.old-deja/g++.law/weak.C b/gcc/testsuite/g++.old-deja/g++.law/weak.C index ea07afe..99a0f17 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 b76ad50..ef1434f 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 <stdlib.h> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index d9ec391..c847de0 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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 { |