Added this addendum to PR118764 / "compact vector table".
Johann
--
AVR: ad target/118764 - Let -mcvt set built-in macro __AVR_CVT__
gcc/
PR target/118764
* config/avr/avr-c.cc (avr_cpu_cpp_builtins)
[TARGET_CVT]: Define __AVR_CVT__.
* doc/invoke.texi (AVR Built-in Macros): Document __AVR_CVT__.
diff --git a/gcc/config/avr/avr-c.cc b/gcc/config/avr/avr-c.cc
index 6f49d3f98a0..9176a49bc44 100644
--- a/gcc/config/avr/avr-c.cc
+++ b/gcc/config/avr/avr-c.cc
@@ -420,6 +420,9 @@ avr_cpu_cpp_builtins (cpp_reader *pfile)
if (TARGET_RMW)
cpp_define (pfile, "__AVR_ISA_RMW__");
+ if (TARGET_CVT)
+ cpp_define (pfile, "__AVR_CVT__");
+
cpp_define_formatted (pfile, "__AVR_SFR_OFFSET__=0x%x",
avr_arch->sfr_offset);
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index d1d633beb4b..ca8e468f3f2 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -24834,6 +24834,10 @@ is defined to @code{atmega8}.
If @var{device} is not a device but only a core architecture like
@samp{avr51}, this macro is not defined.
+@item __AVR_CVT__
+The code is being compiled with option @code{-mcvt} to use a
+@emph{compact vector table}.
+
@item __AVR_XMEGA__
The device / architecture belongs to the XMEGA family of devices.