https://gcc.gnu.org/g:2b44b11cae6847893bf4b7bc327d0d2913588006
commit r15-5984-g2b44b11cae6847893bf4b7bc327d0d2913588006 Author: Georg-Johann Lay <a...@gjlay.de> Date: Fri Dec 6 11:52:16 2024 +0100 AVR: Disable generation of CRC lookup tables. With -foptimize-crc, large lookup tables may be generated which are places in .rodata (RAM). This patch disables such tables. gcc/ * common/config/avr/avr-common.cc (avr_option_optimization_table): Default to -fno-optimize-crc. Diff: --- gcc/common/config/avr/avr-common.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/common/config/avr/avr-common.cc b/gcc/common/config/avr/avr-common.cc index 9059e7d2b485..7a05e19a8bec 100644 --- a/gcc/common/config/avr/avr-common.cc +++ b/gcc/common/config/avr/avr-common.cc @@ -32,6 +32,8 @@ static const struct default_options avr_option_optimization_table[] = // The only effect of -fcaller-saves might be that it triggers // a frame without need when it tries to be smart around calls. { OPT_LEVELS_ALL, OPT_fcaller_saves, NULL, 0 }, + // Avoid large lookup tables in RAM from -foptimize-crc. + { OPT_LEVELS_ALL, OPT_foptimize_crc, NULL, 0 }, { OPT_LEVELS_1_PLUS_NOT_DEBUG, OPT_mgas_isr_prologues, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_mmain_is_OS_task, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_mfuse_add_, NULL, 1 },