This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb/binutils-2_26-branch] Skip linker plugin tests if the linker has not been configured to support plugins.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=096d2e0add5c2700d32d35fa83d6cc69ca722ec5

commit 096d2e0add5c2700d32d35fa83d6cc69ca722ec5
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jan 18 11:23:00 2016 +0000

    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.

Diff:
---
 ld/testsuite/ChangeLog            | 5 +++++
 ld/testsuite/ld-plugin/plugin.exp | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 14edc57..1a5df41 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -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
diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp
index b6007eb..c5b83e8 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"]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]