diff options
author | Tom de Vries <tom@codesourcery.com> | 2014-08-01 06:16:07 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2014-08-01 06:16:07 +0000 |
commit | bbe2542f728dbd46ffc9997537e62228173ffa24 (patch) | |
tree | 3c8a69ed33bf1cb1e461031d831281b630a1e76b /gcc | |
parent | 649aa8c1830b0ed5693922a575ecee7d3277e1b2 (diff) | |
download | gcc-bbe2542f728dbd46ffc9997537e62228173ffa24.zip gcc-bbe2542f728dbd46ffc9997537e62228173ffa24.tar.gz gcc-bbe2542f728dbd46ffc9997537e62228173ffa24.tar.bz2 |
Don't run cproj-fails-with-broken-glibc for broken glibc
2014-08-01 Tom de Vries <tom@codesourcery.com>
* lib/target-supports.exp (check_effective_target_glibc)
(check_effective_target_glibc_2_12_or_later)
(check_effective_target_not_glibc_2_11_or_earlier): New proc.
* gcc.dg/cproj-fails-with-broken-glibc.c: Require effective target
not_glibc_2_11_or_earlier.
From-SVN: r213403
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 38 |
3 files changed, 47 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index df30b4b..37b42b3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2014-08-01 Tom de Vries <tom@codesourcery.com> + + * lib/target-supports.exp (check_effective_target_glibc) + (check_effective_target_glibc_2_12_or_later) + (check_effective_target_not_glibc_2_11_or_earlier): New proc. + * gcc.dg/cproj-fails-with-broken-glibc.c: Require effective target + not_glibc_2_11_or_earlier. + 2014-07-31 Tom de Vries <tom@codesourcery.com> * gcc.dg/pr51879-7.c: Remove superfluous declaration of bar. diff --git a/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c b/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c index fe143b9..1df29f9 100644 --- a/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c +++ b/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c @@ -11,6 +11,7 @@ /* { dg-options "-fno-builtin-cproj" } */ /* { dg-add-options c99_runtime } */ /* { dg-require-effective-target c99_runtime } */ +/* { dg-require-effective-target not_glibc_2_11_or_earlier } */ extern void abort(void); extern void exit(int); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index fa5137e..cbe2930 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5038,6 +5038,44 @@ proc check_effective_target_newlib {} { }] } +# Return true if this is a glibc target. + +proc check_effective_target_glibc {} { + return [check_no_compiler_messages glibc object { + #include <features.h> + #if !(defined (__GLIBC__) && defined (__GLIBC_MINOR__)) + #error FOO + #endif + }] +} + +# Return true if this is a glibc 2.12 or later target. + +proc check_effective_target_glibc_2_12_or_later {} { + return [check_no_compiler_messages glibc_2_12_or_later object { + #include <features.h> + #if !(defined (__GLIBC__) && defined (__GLIBC_MINOR__) \ + && __GLIBC_PREREQ(2,12)) + #error FOO + #endif + }] +} + +# Return true if this is a not a glibc 2.11 or earlier target. + +proc check_effective_target_not_glibc_2_11_or_earlier {} { + + if { ![check_effective_target_glibc] } { + return 1 + } + + if { [check_effective_target_glibc_2_12_or_later] } { + return 1 + } + + return 0 +} + # Return true if this is NOT a Bionic target. proc check_effective_target_non_bionic {} { |