Commit 54649631 by Toma Tabacu Committed by Toma Tabacu

Add check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.

gcc/
	* doc/sourcebuild.texi (Effective-Target Keywords, Environment
	attributes): Document gettimeofday.

gcc/testsuite/

	* gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for
	gettimeofday.  Remove dg-skip-if for AVR.
	* lib/target-supports.exp (check_effective_target_gettimeofday):
	New proc.

From-SVN: r245921
parent 1b31fca7
2017-03-06 Toma Tabacu <toma.tabacu@imgtec.com>
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document gettimeofday.
2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com> 2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com>
* config/s390/s390.c (s390_option_override_internal): Set * config/s390/s390.c (s390_option_override_internal): Set
......
...@@ -1914,6 +1914,9 @@ Target is @samp{freestanding} as defined in section 4 of the C99 standard. ...@@ -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 Effectively, it is a target which supports no extra headers or libraries
other than what is considered essential. other than what is considered essential.
@item gettimeofday
Target supports @code{gettimeofday}.
@item init_priority @item init_priority
Target supports constructors with initialization priority arguments. Target supports constructors with initialization priority arguments.
......
2017-03-06 Toma Tabacu <toma.tabacu@imgtec.com>
* gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for
gettimeofday. Remove dg-skip-if for AVR.
* lib/target-supports.exp (check_effective_target_gettimeofday):
New proc.
2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com> 2017-03-06 Robin Dapp <rdapp@linux.vnet.ibm.com>
* gcc.target/s390/hotpatch-1.c: Check for nopr %r0. * gcc.target/s390/hotpatch-1.c: Check for nopr %r0.
......
/* { dg-lto-do link } */ /* { dg-lto-do link } */
/* { dg-skip-if "Needs gettimeofday" { "avr-*-*" } } */ /* { dg-require-effective-target gettimeofday } */
extern int printf (const char *__restrict __format, ...); extern int printf (const char *__restrict __format, ...);
typedef long int __time_t; typedef long int __time_t;
......
...@@ -968,6 +968,11 @@ proc check_effective_target_setrlimit {} { ...@@ -968,6 +968,11 @@ proc check_effective_target_setrlimit {} {
return [check_function_available "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. # Return 1 if the target supports swapcontext, 0 otherwise.
proc check_effective_target_swapcontext {} { proc check_effective_target_swapcontext {} {
return [check_no_compiler_messages swapcontext executable { return [check_no_compiler_messages swapcontext executable {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment