This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Another boot strap fix
- From: Andi Kleen <andi at firstfloor dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Nov 2015 00:22:35 +0100
- Subject: Another boot strap fix
- Authentication-results: sourceware.org; auth=none
Without this patch bootstrap errors out with
In file included from ./plugin-version.h:1:0,
from ../../gcc/gcc/plugin.c:34:
./configargs.h:3:19: error: 'thread_model' defined but not used [-Werror=unused-variable]
static const char thread_model[] = "posix";
^~~~~~~~~~~~
gcc/:
2015-11-15 Andi Kleen <ak@linux.intel.com>
* configure.ac: Make configargs.h variables global.
Add name to structure.
* configure: dito.
diff --git a/gcc/configure b/gcc/configure
index d5f6dd4..1f68744 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -11794,10 +11794,11 @@ rm -f conftest.out
cat > configargs.h <<EOF
/* Generated automatically. */
-static const char configuration_arguments[] = "$gcc_config_arguments_str";
-static const char thread_model[] = "$thread_file";
+char configuration_arguments[] = "$gcc_config_arguments_str";
+char thread_model[] = "$thread_file";
-static const struct {
+/* struct has to have a name to pacify C++ */
+struct gcc_opts {
const char *name, *value;
} configure_default_options[] = $configure_default_options;
EOF
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 34df549..4fb7993 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1707,10 +1707,11 @@ rm -f conftest.out
cat > configargs.h <<EOF
/* Generated automatically. */
-static const char configuration_arguments[] = "$gcc_config_arguments_str";
-static const char thread_model[] = "$thread_file";
+char configuration_arguments[] = "$gcc_config_arguments_str";
+char thread_model[] = "$thread_file";
-static const struct {
+/* struct has to have a name to pacify C++ */
+struct gcc_opts {
const char *name, *value;
} configure_default_options[] = $configure_default_options;
EOF
--
ak@linux.intel.com -- Speaking for myself only.