]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ootstrap: Fix bootstrap with --disable-plugin [PR104176]
authorJakub Jelinek <jakub@redhat.com>
Sat, 22 Jan 2022 18:04:41 +0000 (19:04 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sat, 22 Jan 2022 18:04:41 +0000 (19:04 +0100)
With --disable-plugin, bootstrap fails on x86_64-linux or probably
all other targets with:
../../gcc/opts-global.cc: In function ‘void handle_common_deferred_options()’:
../../gcc/opts-global.cc:420:62: error: unquoted option name ‘--enable-plugin’ in format [-Werror=format-diag]
  420 |           error ("plugin support is disabled; configure with --enable-plugin");
      |                                                              ^~~~~~~~~~~~~~~
../../gcc/opts-global.cc:428:62: error: unquoted option name ‘--enable-plugin’ in format [-Werror=format-diag]
  428 |           error ("plugin support is disabled; configure with --enable-plugin");
      |                                                              ^~~~~~~~~~~~~~~

The following patch fixes that.

2022-01-22  Jakub Jelinek  <jakub@redhat.com>

PR other/104176
* opts-global.cc (handle_common_deferred_options): Quote
--enable-plugin in diagnostics to avoid -Werror=format-diag.

gcc/opts-global.cc

index 0a17896cbb18e53d4b6007e3ca0894cb7ea305c2..a18c76940f971d8ff60ffacaa43ae1e8d41f1ed5 100644 (file)
@@ -417,7 +417,8 @@ handle_common_deferred_options (void)
 #ifdef ENABLE_PLUGIN
          add_new_plugin (opt->arg);
 #else
-         error ("plugin support is disabled; configure with --enable-plugin");
+         error ("plugin support is disabled; configure with "
+                "%<--enable-plugin%>");
 #endif
          break;
 
@@ -425,7 +426,8 @@ handle_common_deferred_options (void)
 #ifdef ENABLE_PLUGIN
          parse_plugin_arg_opt (opt->arg);
 #else
-         error ("plugin support is disabled; configure with --enable-plugin");
+         error ("plugin support is disabled; configure with "
+                "%<--enable-plugin%>");
 #endif
          break;