+2020-06-06 Alan Modra <amodra@gmail.com>
+
+ * lexsup.c (ld_options): Accept -plugin and -plugin-opt when
+ !ENABLE_PLUGINS.
+ * testsuite/lib/ld-lib.exp (check_plugin_api_available): Adjust.
+
2020-06-05 Nelson Chu <nelson.chu@sifive.com>
* testsuite/ld-riscv-elf/attr-merge-priv-spec.d: Rename to
{ {"flto-partition=", required_argument, NULL, OPTION_IGNORE},
'\0', NULL, N_("Ignored for GCC LTO option compatibility"),
ONE_DASH },
+#else
+ { {"plugin", required_argument, NULL, OPTION_IGNORE},
+ '\0', N_("PLUGIN"), N_("Load named plugin (ignored)"), ONE_DASH },
+ { {"plugin-opt", required_argument, NULL, OPTION_IGNORE},
+ '\0', N_("ARG"), N_("Send arg to last-loaded plugin (ignored)"), ONE_DASH },
#endif /* ENABLE_PLUGINS */
{ {"fuse-ld=", required_argument, NULL, OPTION_IGNORE},
'\0', NULL, N_("Ignored for GCC linker option compatibility"),
if {![info exists plugin_api_available_saved]} {
# Check if the ld used by gcc supports --plugin.
set ld_output [remote_exec host $ld "--help"]
- if { [ string first "-plugin PLUGIN" $ld_output ] >= 0 } {
+ if { [regexp -- "-plugin PLUGIN \[^\n\r\]*" $ld_output line]
+ && ![regexp "ignored" $line] } {
set plugin_api_available_saved 1
} else {
set plugin_api_available_saved 0