aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToma Tabacu <toma.tabacu@imgtec.com>2017-03-09 15:04:31 +0000
committerToma Tabacu <tomtab@gcc.gnu.org>2017-03-09 15:04:31 +0000
commit1f1fd3e2721cf68b2fe8b9516f260aee89872f60 (patch)
tree364a4eb26046fb29a3d4f50af876bf2651568315
parent9125b9fc80f832228067dfabb6282a321b8844a8 (diff)
downloadgcc-1f1fd3e2721cf68b2fe8b9516f260aee89872f60.zip
gcc-1f1fd3e2721cf68b2fe8b9516f260aee89872f60.tar.gz
gcc-1f1fd3e2721cf68b2fe8b9516f260aee89872f60.tar.bz2
Add check_effective_target_rdynamic and use it in g++.dg/lto/pr69589_0.C.
gcc/ * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes): Document rdynamic. gcc/testsuite/ * g++.dg/lto/pr69589_0.C: Add dg-require-effective-target for rdynamic. Remove dg-skip-if for targets which don't support -rdynamic. * lib/target-supports.exp (check_effective_target_rdynamic): New proc. From-SVN: r246004
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/sourcebuild.texi3
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.dg/lto/pr69589_0.C2
-rw-r--r--gcc/testsuite/lib/target-supports.exp8
5 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7c0bb71..901d0a4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-09 Toma Tabacu <toma.tabacu@imgtec.com>
+
+ * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
+ Document rdynamic.
+
2017-03-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/79949
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index da17ff6..84d9a22 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2068,6 +2068,9 @@ Target supports @option{-mpe-aligned-commons}.
@item pie
Target supports @option{-pie}, @option{-fpie} and @option{-fPIE}.
+@item rdynamic
+Target supports @option{-rdynamic}.
+
@item section_anchors
Target supports section anchors.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3e7e1576..deb6f63 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2017-03-09 Toma Tabacu <toma.tabacu@imgtec.com>
+
+ * g++.dg/lto/pr69589_0.C: Add dg-require-effective-target for
+ rdynamic. Remove dg-skip-if for targets which don't support -rdynamic.
+ * lib/target-supports.exp (check_effective_target_rdynamic):
+ New proc.
+
2017-03-09 Richard Biener <rguenther@suse.de>
PR middle-end/79971
diff --git a/gcc/testsuite/g++.dg/lto/pr69589_0.C b/gcc/testsuite/g++.dg/lto/pr69589_0.C
index 11766f1..599d5d4 100644
--- a/gcc/testsuite/g++.dg/lto/pr69589_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr69589_0.C
@@ -1,7 +1,7 @@
// { dg-lto-do link }
// { dg-lto-options "-O2 -rdynamic" }
// { dg-extra-ld-options "-r -nostdlib" }
-// { dg-skip-if "Skip targets without -rdynamic support" { arm*-none-eabi aarch64*-*-elf nios2-*-elf } { "*" } { "" } }
+// { dg-require-effective-target rdynamic }
#pragma GCC visibility push(hidden)
struct A { int &operator[] (long); };
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d1639dc..43e497b 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1489,6 +1489,14 @@ proc check_effective_target_static_libgfortran { } {
} "-static"]
}
+# Return 1 if we can use the -rdynamic option, 0 otherwise.
+
+proc check_effective_target_rdynamic { } {
+ return [check_no_compiler_messages rdynamic executable {
+ int main() { return 0; }
+ } "-rdynamic"]
+}
+
# Return 1 if cilk-plus is supported by the target, 0 otherwise.
proc check_effective_target_cilkplus { } {