Message ID | 53DD1143.2030001@mentor.com |
---|---|
State | New |
Headers | show |
On Aug 2, 2014, at 9:26 AM, Tom de Vries <Tom_deVries@mentor.com> wrote: > I've made it an xfail, and added documentation in attached follow-up patch. > OK? Ok. > Or do we go with the removal suggestion of Mike? I’ll let others weigh in. I’m fine either way. Original author likely prefers the xfail, so I’m fine with the above.
Hi Mike, >> Or do we go with the removal suggestion of Mike? > > I’ll let others weigh in. I’m fine either way. Original author likely > prefers the xfail, so I’m fine with the above. the test now XPASSes on Solaris, adding testsuite noise in the other direction on completely innocent systems. Given that we're not actually testing gcc behaviour or a workaround for a glibc bug here, but just alerting users to changed cproj semantics on old and newer glibc systems https://gcc.gnu.org/ml/gcc-patches/2010-04/msg01285.html I'd strongly suggest just removing the test and the supporting effective-target keywords. Rainer
2014-08-01 Tom de Vries <tom@codesourcery.com> * gcc.dg/cproj-fails-with-broken-glibc.c: Use xfail for broken glibc version instead of required-target. * lib/target-supports.exp (check_effective_target_not_glibc_2_11_or_earlier): Replace by ... (check_effective_target_glibc_2_11_or_earlier): ... this. * doc/sourcebuild.texi (glibc, glibc_2_12_or_later) (glibc_2_11_or_earlier): Document effective-target keywords. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 39152df..0793f80 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1804,6 +1804,15 @@ Target is a VxWorks RTP. @item wchar Target supports wide characters. + +@item glibc +Target supports glibc + +@item glibc_2_12_or_later +Target supports glibc 2.12 or later + +@item glibc_2_11_or_earlier +Target supports glibc 2.11 or earlier @end table @subsubsection Other attributes 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 1df29f9..fc37fac 100644 --- a/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c +++ b/gcc/testsuite/gcc.dg/cproj-fails-with-broken-glibc.c @@ -7,11 +7,10 @@ Origin: Kaveh R. Ghazi, April 20, 2010. */ -/* { dg-do run } */ +/* { dg-do run { xfail glibc_2_11_or_earlier } } */ /* { 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 cbe2930..7157d2a 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -5061,19 +5061,19 @@ proc check_effective_target_glibc_2_12_or_later {} { }] } -# Return true if this is a not a glibc 2.11 or earlier target. +# Return true if this is a glibc 2.11 or earlier target. -proc check_effective_target_not_glibc_2_11_or_earlier {} { +proc check_effective_target_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 0 + return 1 } # Return true if this is NOT a Bionic target. -- 1.9.1