The building for AVR target is aborted at compilation libgcc stage with
error: Illegal opcode movw for mcu avr3.  The lastest official release
of binutils is used: 2.18.  The reason of error is an attempt to assemble
MOVW command for avr3 architecture which permits only classic instruction
set historically.

The workaround is to add '-mall-opcodes' avr-as option for this case.
Replace into 'config/avr/avr.h' the string:
    #define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;
        mmcu=avr35:-mmcu=avr3;
        mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;mmcu=*:-mmcu=%*}"
to:
    #define ASM_SPEC "%{mmcu=avr25:-mmcu=avr2;
        mmcu=avr35:-mmcu=avr3 -mall-opcodes;
        mmcu=avr31:-mmcu=avr3;mmcu=avr51:-mmcu=avr5;mmcu=*:-mmcu=%*}"

After this edition the build and installation are fine.


-- 
           Summary: [avr] 4.3.0 buid error: illegal opcode movw for mcu avr3
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dmixm at marine dot febras dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35506

Reply via email to