Add check_effective_target_rdynamic and use it in g++.dg/lto/pr69589_0.C.
authorToma Tabacu <toma.tabacu@imgtec.com>
Thu, 9 Mar 2017 15:04:31 +0000 (15:04 +0000)
committerToma Tabacu <tomtab@gcc.gnu.org>
Thu, 9 Mar 2017 15:04:31 +0000 (15:04 +0000)
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

gcc/ChangeLog
gcc/doc/sourcebuild.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr69589_0.C
gcc/testsuite/lib/target-supports.exp

index 7c0bb715984981a932603c7a2d24564c90018466..901d0a45033211f612d16190b00318d70b5fd4a3 100644 (file)
@@ -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
index da17ff6759108b04da972d881c4a72e4eebc637c..84d9a22ccf7b092ddbfe15194bc4fc8a84cb5477 100644 (file)
@@ -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.
 
index 3e7e15760b7219d8c7f2b7b8d84eab7fcdbb7bb7..deb6f6392592bd34338714dd996be6fc189e99f3 100644 (file)
@@ -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
index 11766f1fe0719fdd213b4feb304952b6796f95df..599d5d44960cd21c55746f4c5c7837539ac8b168 100644 (file)
@@ -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); };
index d1639dc6701f793d0e999d074efe54179768b8ff..43e497b4a8c677e8043ef2fe552481cdfbae6f69 100644 (file)
@@ -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 { } {