This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Another boot strap fix
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Nov 2015 23:32:13 +0000
- Subject: Re: Another boot strap fix
- Authentication-results: sourceware.org; auth=none
- References: <20151115232235 dot GA15533 at two dot firstfloor dot org>
On Mon, 16 Nov 2015, Andi Kleen wrote:
> 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;
But we want these to be const rather than going in writable storage, and
static given that they are initialized in a header. I'd suggest marking
them with ATTRIBUTE_UNUSED to reflect that files including this header may
not use all the values.
--
Joseph S. Myers
joseph@codesourcery.com