]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Skip linker plugin tests if the linker has not been configured to support plugins.
authorNick Clifton <nickc@redhat.com>
Mon, 18 Jan 2016 11:23:00 +0000 (11:23 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 18 Jan 2016 11:23:00 +0000 (11:23 +0000)
* ld-plugin/plugin.exp: Skip plugin tests if the linker is not
configured to support plugins.

ld/testsuite/ChangeLog
ld/testsuite/ld-plugin/plugin.exp

index 14edc57a321d585fcc9909cf8db8cfcefcde6493..1a5df41ca863806c12ac2916f399b2c087fbac26 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-18  Nick Clifton  <nickc@redhat.com>
+
+       * ld-plugin/plugin.exp: Skip plugin tests if the linker is not
+       configured to support plugins.
+
 2016-01-14  Alan Modra  <amodra@gmail.com>
 
        PR ld/19421
index b6007ebd20ed46ac17c78f48738961ce4372073b..c5b83e80a63085d47e2934ceba37bd87be089be4 100644 (file)
@@ -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"]