aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2017-06-10 06:59:49 +0000
committerTom de Vries <vries@gcc.gnu.org>2017-06-10 06:59:49 +0000
commit18787c384aba66221a157862c81238b9fea4e13d (patch)
treea0b4f44878c6c1825b436f7a2a1d2891828cd657
parent0069a009910c4d8d3d95db6a3760abd0580f4183 (diff)
downloadgcc-18787c384aba66221a157862c81238b9fea4e13d.zip
gcc-18787c384aba66221a157862c81238b9fea4e13d.tar.gz
gcc-18787c384aba66221a157862c81238b9fea4e13d.tar.bz2
Add effective target signal
2017-06-10 Tom de Vries <tom@codesourcery.com> * lib/target-supports.exp (check_effective_target_signal): New proc. * lib/gcc.exp (gcc_target_compile): Remove appending of -DSIGNAL_SUPPRESS to additional_flags. * gcc.c-torture/execute/ieee/ieee.exp: Add -DSIGNAL_SUPPRESS to additional_flags if effective target signal is not supported by the target. * gcc.c-torture/execute/20101011-1.c: Same. * gcc.dg/c99-stdint-1.c: Same. * gcc.dg/c99-stdint-2.c: Same. * gcc.dg/c99-stdint-5.c: Same. * gcc.dg/c99-stdint-6.c: Same. * gcc.dg/stdint-width-1.c: Same. * doc/sourcebuild.texi (Effective-Target Keywords, Environment attributes): Document signal effective target. From-SVN: r249091
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/sourcebuild.texi3
-rw-r--r--gcc/testsuite/ChangeLog15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20101011-1.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp4
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-6.c1
-rw-r--r--gcc/testsuite/gcc.dg/stdint-width-1.c1
-rw-r--r--gcc/testsuite/lib/gcc.exp4
-rw-r--r--gcc/testsuite/lib/target-supports.exp9
12 files changed, 43 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 99c54d1..d55bdf4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2017-06-10 Tom de Vries <tom@codesourcery.com>
+ * doc/sourcebuild.texi (Effective-Target Keywords, Environment
+ attributes): Document signal effective target.
+
+2017-06-10 Tom de Vries <tom@codesourcery.com>
+
* doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
Document effective target stack_size.
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index cdb3a2c..e5f0da6 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1973,6 +1973,9 @@ time) should be run on this target. This can be enabled by setting the
Test system runs executables on a simulator (i.e. slowly) rather than
hardware (i.e. fast).
+@item signal
+Target has @code{signal.h}.
+
@item stabs
Target supports the stabs debugging format.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7ffa0c0..190054e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,20 @@
2017-06-10 Tom de Vries <tom@codesourcery.com>
+ * lib/target-supports.exp (check_effective_target_signal): New proc.
+ * lib/gcc.exp (gcc_target_compile): Remove appending of
+ -DSIGNAL_SUPPRESS to additional_flags.
+ * gcc.c-torture/execute/ieee/ieee.exp: Add -DSIGNAL_SUPPRESS to
+ additional_flags if effective target signal is not supported by the
+ target.
+ * gcc.c-torture/execute/20101011-1.c: Same.
+ * gcc.dg/c99-stdint-1.c: Same.
+ * gcc.dg/c99-stdint-2.c: Same.
+ * gcc.dg/c99-stdint-5.c: Same.
+ * gcc.dg/c99-stdint-6.c: Same.
+ * gcc.dg/stdint-width-1.c: Same.
+
+2017-06-10 Tom de Vries <tom@codesourcery.com>
+
* lib/target-supports.exp (check_effective_target_stack_size)
(dg-effective-target-value): New proc.
* lib/gcc.exp (gcc_target_compile): Remove adding of DSTACK_SIZE to
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
index 899a401..dda49a5 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -1,5 +1,6 @@
/* { dg-options "-fnon-call-exceptions" } */
/* With -fnon-call-exceptions 0 / 0 should not be eliminated. */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#ifdef SIGNAL_SUPPRESS
# define DO_TEST 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
index 26247d6..043e02d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
@@ -53,6 +53,10 @@ if { [istarget "alpha*-*-*"]
lappend additional_flags "-mieee"
}
+if { ![check_effective_target_signal] } {
+ lappend additional_flags "-DSIGNAL_SUPPRESS"
+}
+
# load support procs
load_lib c-torture.exp
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-1.c b/gcc/testsuite/gcc.dg/c99-stdint-1.c
index 530d130..f5c2cda 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-1.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-1.c
@@ -10,6 +10,7 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors -fhosted" } */
/* { dg-require-effective-target ptr32plus } */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#include <limits.h>
#include <stdint.h>
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-2.c b/gcc/testsuite/gcc.dg/c99-stdint-2.c
index 1784b0c..08d9f60 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-2.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-2.c
@@ -3,6 +3,8 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors -ffreestanding" } */
/* { dg-require-effective-target ptr32plus } */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
+
/* The test is that there are no diagnostics, so just include the
hosted version. */
#include "c99-stdint-1.c"
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-5.c b/gcc/testsuite/gcc.dg/c99-stdint-5.c
index 9c224ed..6051323 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-5.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-5.c
@@ -3,6 +3,7 @@
compilations). */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#include <stdint.h>
#ifndef SIGNAL_SUPPRESS
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-6.c b/gcc/testsuite/gcc.dg/c99-stdint-6.c
index 150666c..60ac31f 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-6.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-6.c
@@ -2,6 +2,7 @@
with any system <inttypes.h> header. */
/* { dg-do compile { target inttypes_types } } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#include <inttypes.h>
#ifndef SIGNAL_SUPPRESS
diff --git a/gcc/testsuite/gcc.dg/stdint-width-1.c b/gcc/testsuite/gcc.dg/stdint-width-1.c
index a28feee..3eba9f6 100644
--- a/gcc/testsuite/gcc.dg/stdint-width-1.c
+++ b/gcc/testsuite/gcc.dg/stdint-width-1.c
@@ -1,6 +1,7 @@
/* Test TS 18661-1 width macros in <stdint.h>. */
/* { dg-do compile } */
/* { dg-options "-std=c11 -ffreestanding" } */
+/* { dg-additional-options "-DSIGNAL_SUPPRESS" { target { ! signal } } } */
#include <stddef.h>
#define __STDC_WANT_IEC_60559_BFP_EXT__
diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp
index e4ac239..406ec4a 100644
--- a/gcc/testsuite/lib/gcc.exp
+++ b/gcc/testsuite/lib/gcc.exp
@@ -141,10 +141,6 @@ proc gcc_target_compile { source dest type options } {
lappend options "ldflags=$TEST_EXTRA_LIBS"
}
- if [target_info exists gcc,signal_suppress] {
- lappend options "additional_flags=-DSIGNAL_SUPPRESS"
- }
-
# TEST_ALWAYS_FLAGS are flags that should be passed to every
# compilation. They are passed first to allow individual
# tests to override them.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d7efc19..31701c2 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -525,6 +525,15 @@ proc dg-effective-target-value { effective_target } {
return 0
}
+# Return 1 if signal.h is supported.
+
+proc check_effective_target_signal { } {
+ if [target_info exists gcc,signal_suppress] {
+ return 0
+ }
+ return 1
+}
+
# Return 1 if according to target_info struct and explicit target list
# target disables -fdelete-null-pointer-checks. Targets should return 0
# if they simply default to -fno-delete-null-pointer-checks but obey