Michael Meissner wrote:
> Segher Boessenkool asked me on IRC to break out the fix in the last change.
> This patch is just the change to set the default options if the user did not
> use -mcpu=<xxx> and the compiler was not configured with --with-cpu=<xxx>.
> Here are the patches.

Which GCC releases are affected by this bug?

Regards,
Gunther

> I can submit this patch first if David desires, and then resubmit the first of
> the infrastructure patches again, or commit both together.
> 
> 2012-09-28  Michael Meissner  <meiss...@linux.vnet.ibm.com>
> 
>       * config/rs6000/rs6000.c (rs6000_option_override_internal): If
>       -mcpu=<xxx> is not specified and the compiler is not configured
>       using --with-cpu=<xxx>, use the bits from the TARGET_DEFAULT to
>       set the initial options.
> 
> Index: gcc/config/rs6000/rs6000.c
> ===================================================================
> --- gcc/config/rs6000/rs6000.c        (revision 191831)
> +++ gcc/config/rs6000/rs6000.c        (working copy)
> @@ -2461,6 +2461,11 @@ rs6000_option_override_internal (bool gl
>    target_flags |= (processor_target_table[cpu_index].target_enable
>                  & set_masks);
>  
> +  /* If no -mcpu=<xxx>, inherit any default options that were cleared via
> +     POWERPC_MASKS.  */
> +  if (!have_cpu)
> +    target_flags |= (TARGET_DEFAULT & ~target_flags_explicit);
> +
>    if (rs6000_tune_index >= 0)
>      tune_index = rs6000_tune_index;
>    else if (have_cpu)

Reply via email to