aboutsummaryrefslogtreecommitdiff
path: root/gold/options.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2018-03-27 17:49:49 -0700
committerCary Coutant <ccoutant@gmail.com>2018-03-28 14:02:41 -0700
commit24538276c675851520d45714661e7cf9bedd55bb (patch)
tree6790f4d6a402478a83ec0d75c5cac8bf27eb3a42 /gold/options.cc
parent8205a328f8b852086652841dfc2aff4ca0b16d45 (diff)
downloadgdb-24538276c675851520d45714661e7cf9bedd55bb.zip
gdb-24538276c675851520d45714661e7cf9bedd55bb.tar.gz
gdb-24538276c675851520d45714661e7cf9bedd55bb.tar.bz2
Use top-level config support for enabling plugins.
Also recognizes --plugin options when plugins are disabled. 2018-03-28 Cary Coutant <ccoutant@gmail.com> gold/ PR gold/21423 PR gold/22500 * configure.ac: Call AC_USE_SYSTEM_EXTENSIONS. Replace check for --enable-plugins with AC_PLUGINS. * options.cc (parse_plugin, parse_plugin_opt): Remove #ifdef. (General_options::finalize): Check if plugins enabled. * options.h (--plugin, --plugin-opt): Define even if plugins not enabled. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * testsuite/Makefile.in: Regenerate.
Diffstat (limited to 'gold/options.cc')
-rw-r--r--gold/options.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/options.cc b/gold/options.cc
index f511ba1..05b9bba 100644
--- a/gold/options.cc
+++ b/gold/options.cc
@@ -448,7 +448,6 @@ General_options::parse_library(const char*, const char* arg,
cmdline->inputs().add_file(file);
}
-#ifdef ENABLE_PLUGINS
void
General_options::parse_plugin(const char*, const char* arg,
Command_line*)
@@ -464,7 +463,6 @@ General_options::parse_plugin_opt(const char*, const char* arg,
{
this->add_plugin_option(arg);
}
-#endif // ENABLE_PLUGINS
void
General_options::parse_R(const char* option, const char* arg,
@@ -1208,6 +1206,13 @@ General_options::finalize()
program_name);
#endif
+#ifndef ENABLE_PLUGINS
+ if (this->has_plugins())
+ gold_fatal(_("cannot use --plugin: "
+ "%s was compiled without plugin support"),
+ program_name);
+#endif
+
std::string libpath;
if (this->user_set_Y())
{