aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToma Tabacu <toma.tabacu@imgtec.com>2017-03-06 13:15:30 +0000
committerToma Tabacu <toma.tabacu@imgtec.com>2017-03-06 13:15:30 +0000
commit5505aa378a6dbb6d95a37ac68211ecddcb9d554a (patch)
tree50986e8c975549cb85de6e7f01986def77c145a4
parent1e544db015f06dd88e99029a88fdfd2f8f0d176f (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@245921 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/sourcebuild.texi3
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60449_0.c2
-rw-r--r--gcc/testsuite/lib/target-supports.exp5
5 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1176ec3e465..be8b6d9b673 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
* config/s390/s390.c (s390_option_override_internal): Set
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 0dc434824b8..da17ff67591 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/ChangeLog b/gcc/testsuite/ChangeLog
index a6efef5e0b8..f90154a6fa6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+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>
* gcc.target/s390/hotpatch-1.c: Check for nopr %r0.
diff --git a/gcc/testsuite/gcc.dg/lto/pr60449_0.c b/gcc/testsuite/gcc.dg/lto/pr60449_0.c
index 5b878a640db..e6c3166e94a 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 2766af4f679..d1639dc6701 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 {