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.
This commit is contained in:
Nick Clifton 2016-01-18 11:23:44 +00:00
parent 8a08deaa87
commit 760f6ee894
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2016-01-18 Nick Clifton <nickc@redhat.com>
* testsuite/ld-plugin/plugin.exp: Skip plugin tests if the linker
is not configured to support plugins.
2016-01-17 Alan Modra <amodra@gmail.com>
* configure: Regenerate.

View 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"]