Message ID | A614194ED15B4844BC4C9FB7F21FCD927045651D@hhmail02.hh.imgtec.org |
---|---|
State | New |
Headers | show |
> -----Original Message----- > From: Toma Tabacu [mailto:Toma.Tabacu@imgtec.com] > Sent: Thursday, March 2, 2017 11:47 AM > To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > Cc: Moore, Catherine <Catherine_Moore@mentor.com>; gcc- > patches@gcc.gnu.org; Matthew Fortune > <Matthew.Fortune@imgtec.com> > Subject: RE: [PATCH,testsuite] Skip gcc.dg/lto/pr60449_0.c for mips*-*- > elf* targets. > > Hi, > > > From: Rainer Orth > > > > > > gcc/testsuite/ > > > > > > * gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for > > > gettimeofday. Remove dg-skip-if for AVR. > > > > Two spaces after period. > > > > Fixed. > > > > * lib/target-supports.exp (check_effective_target_gettimeofday): > New. > > > > Better say "New proc." or something like this. > > > > Fixed. > > > > > Thanks for your patience. > > > > Rainer > > No problem. > Thanks for the review. > > Below is the version with the updated ChangeLog entries. > > Catherine, Matthew, what do you think ? > This patch fixes my original objection. Thanks.
> From: Catherine Moore > > This patch fixes my original objection. Thanks. > Committed as r245921. Thanks, Toma
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 0dc4348..da17ff6 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1914,6 +1914,9 @@ Target is @samp{freestanding} as defined in section 4 of the C99 standard. Effectively, it is a target which supports no extra headers or libraries other than what is considered essential. +@item gettimeofday +Target supports @code{gettimeofday}. + @item init_priority Target supports constructors with initialization priority arguments. diff --git a/gcc/testsuite/gcc.dg/lto/pr60449_0.c b/gcc/testsuite/gcc.dg/lto/pr60449_0.c index 5b878a6..e6c3166 100644 --- a/gcc/testsuite/gcc.dg/lto/pr60449_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr60449_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-skip-if "Needs gettimeofday" { "avr-*-*" } } */ +/* { dg-require-effective-target gettimeofday } */ extern int printf (const char *__restrict __format, ...); typedef long int __time_t; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2766af4..d1639dc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -968,6 +968,11 @@ proc check_effective_target_setrlimit {} { return [check_function_available "setrlimit"] } +# Return 1 if the target supports gettimeofday, 0 otherwise. +proc check_effective_target_gettimeofday {} { + return [check_function_available "gettimeofday"] +} + # Return 1 if the target supports swapcontext, 0 otherwise. proc check_effective_target_swapcontext {} { return [check_no_compiler_messages swapcontext executable {