public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* avr-g++: __gcc_isr not supported
@ 2018-05-08  8:18 Klaus Doldinger
  2019-04-26 14:21 ` Georg-Johann Lay
  0 siblings, 1 reply; 2+ messages in thread
From: Klaus Doldinger @ 2018-05-08  8:18 UTC (permalink / raw)
  To: gcc-help

Hi all,

my arch linux box just did an upgrade to avr-g++ 8.1.0. Compiling the
source of some avr-projects now suddenly gives the avr-as error:

tmp/cc44ccNW.s: Assembler messages:
/tmp/cc44ccNW.s:848: Error: pseudo instruction `__gcc_isr' not supported

avr-as is version 2.30

Any hints?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: avr-g++: __gcc_isr not supported
  2018-05-08  8:18 avr-g++: __gcc_isr not supported Klaus Doldinger
@ 2019-04-26 14:21 ` Georg-Johann Lay
  0 siblings, 0 replies; 2+ messages in thread
From: Georg-Johann Lay @ 2019-04-26 14:21 UTC (permalink / raw)
  To: Klaus Doldinger; +Cc: gcc-help

Klaus Doldinger schrieb:
> Hi all,
> 
> my arch linux box just did an upgrade to avr-g++ 8.1.0. Compiling the
> source of some avr-projects now suddenly gives the avr-as error:
> 
> tmp/cc44ccNW.s: Assembler messages:
> /tmp/cc44ccNW.s:848: Error: pseudo instruction `__gcc_isr' not supported
> 
> avr-as is version 2.30
> 
> Any hints?

Hi, most likely you are using a custom specs file intended for an
older version of the compiler.

avr-gxx v8+ emits pseudo-instruction __gcc_isr for optimized ISR
prologue/epilogue generation, and this instruction is resolved
by avr-as -- but only if called with -mgcc-isr, otherwise the
assembler will complain about an unknown instruction.

http://gcc.gnu.org/gcc-8/changes.html#avr
https://gcc.gnu.org/PR20296
https://sourceware.org/PR21683

The compiler adds -mgcc-isr to gas's options only if not
used with -mno-gas-isr-prologues (which should be the case)
and if the specs file contains addition of -mgcc_isr like so:

*asm_gccisr:
         %{!mno-gas-isr-prologues: -mgcc-isr}

Such an enhanced specs file should also work with older versions
of the compiler as *asm_gccisr is not part of its default specs.

You can also set that option by hand, e.g. in your Makefile by
adding -Wa,-mgcc-isr to gcc's options, but then older versions
of gas (2.28 and below) will complain about an unknown option...

When using a custom specs file, use one as a starting point
that's shipped with the same compiler version and belongs to
the same multilib set, i.e. use the same settings of:
-mmcu=* -msp8 -mshort-calls.  The top of the specs file
spells out the multilib set, e.g. for ATtiny814:

# Auto-generated specs for AVR device attiny814 (core avrxmega3, 16-bit 
SP, short-calls)

If you don't use a custom specs file, then your problem is
somewhere else and we need more info.

Johann

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-26 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08  8:18 avr-g++: __gcc_isr not supported Klaus Doldinger
2019-04-26 14:21 ` Georg-Johann Lay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).