From: Georg-Johann Lay Date: Fri, 6 Dec 2024 10:52:16 +0000 (+0100) Subject: AVR: Disable generation of CRC lookup tables. X-Git-Tag: basepoints/gcc-16~3569 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b44b11cae6847893bf4b7bc327d0d2913588006;p=thirdparty%2Fgcc.git 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 --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 },