On 3 November 2014 14:33, Sivanupandi, Pitchumani
<pitchumani.sivanupa...@atmel.com> wrote:
> Hi,
>
> Unrecognized option error is issued by avr-gcc for devices with AVR_ISA_RMW.
> This is because of an incorrect spec string device spec generation.
>
> Below patch corrects the incorrect spec string in gen-avr-mmcu-specs.c.
> If OK, could someone commit please?
>
> diff --git a/gcc/config/avr/gen-avr-mmcu-specs.c 
> b/gcc/config/avr/gen-avr-mmcu-specs.c
> index 73bacf4..772e862 100644
> --- a/gcc/config/avr/gen-avr-mmcu-specs.c
> +++ b/gcc/config/avr/gen-avr-mmcu-specs.c
> @@ -53,7 +53,7 @@ print_mcu (const avr_mcu_t *mcu)
>          ? " -msp8" : " %<msp8");
>
>    errata_skip = (mcu->dev_attribute & AVR_ERRATA_SKIP) ? " -mskip-bug" : "";
> -  rmw = (mcu->dev_attribute & AVR_ISA_RMW) ? "%%{!mno-rmw: -mrmw}" : "";
> +  rmw = (mcu->dev_attribute & AVR_ISA_RMW) ? "%{!mno-rmw: -mrmw}" : "";
>
>    const char *arch_name = avr_arch_types[mcu->arch].arch_name;
>
> Regards,
> Pitchumani
>
> Gcc/ChangeLog
>
> 2014-11-03  Pitchumani Sivanupandi <pitchuman...@atmel.com>
>
>     * config/avr/gen-avr-mmcu-specs.c: Remove unnecessary format specifier.

Oops, indeed.  Although the way I'd put it is that what you're removing is an
extraneous %-printf quoting - extraneous because the variable rmw is not
actually a format string, but a string that is emitted under control
of format strings.

Reply via email to