aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-plugin
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-01-18 11:23:44 +0000
committerNick Clifton <nickc@redhat.com>2016-01-18 11:23:44 +0000
commit760f6ee894c5f473777c7ff5ebe5a04b25651ce4 (patch)
treed859423bcb77dd9d7f18992d9d087f5a82bc141a /ld/testsuite/ld-plugin
parent8a08deaa87a7dbe95786126feeb0192fe923ee17 (diff)
Skip linker plugin tests if the linker has not been configured to support plugins.
* ld-plugin/plugin.exp: Skip plugin tests if the linker is not configured to support plugins.
Diffstat (limited to 'ld/testsuite/ld-plugin')
-rw-r--r--ld/testsuite/ld-plugin/plugin.exp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index 64f40790d3..a8b0e4a245 100644
--- a/ld/testsuite/ld-plugin/plugin.exp
+++ b/ld/testsuite/ld-plugin/plugin.exp
@@ -39,6 +39,12 @@ global base_dir
# Look for the name we can dlopen in the test plugin's libtool control script.
set plugin_name [file_contents "$base_dir/libldtestplug.la"]
set plugin_name [regsub "'.*" [regsub ".*dlname='" "$plugin_name" ""] ""]
+# Even though the API supports plugins it does not mean that the
+# linker was configured with --enable-plugins. Check for that here.
+if { $plugin_name == "" } {
+ verbose "The linker is not configured to support plugins"
+ return
+}
verbose "plugin name is '$plugin_name'"
set plugin2_name [file_contents "$base_dir/libldtestplug2.la"]