aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/avr.c
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2017-07-05 13:57:28 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2017-07-05 13:57:28 +0000
commit98f9d0ca902c48b58d3d9adee53c3a1800fd3e6d (patch)
treeb40fcdc59b02e071b810915d50a83ea9a4ea7524 /gcc/config/avr/avr.c
parente60226ffa0cc0eff39141a4954a506484c17fda4 (diff)
downloadgcc-98f9d0ca902c48b58d3d9adee53c3a1800fd3e6d.zip
gcc-98f9d0ca902c48b58d3d9adee53c3a1800fd3e6d.tar.gz
gcc-98f9d0ca902c48b58d3d9adee53c3a1800fd3e6d.tar.bz2
Graceful degrade if Binutils PR21472 is not available.
gcc/ Graceful degrade if Binutils PR21472 is not available. PR target/81072 * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3 .rodata in flash test fails. (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes. * confgure: Regenerate. * config.in: Regenerate. * config/avr/avr.c (avr_asm_named_section) [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger __do_copy_data for stuff in .rodata if flash_pm_offset = 0. (avr_asm_init_sections): Same. From-SVN: r250000
Diffstat (limited to 'gcc/config/avr/avr.c')
-rw-r--r--gcc/config/avr/avr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 030a9d9..ba35b9e 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -10000,7 +10000,9 @@ avr_asm_init_sections (void)
resp. `avr_need_copy_data_p'. If flash is not mapped to RAM then
we have also to track .rodata because it is located in RAM then. */
+#if defined HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH
if (0 == avr_arch->flash_pm_offset)
+#endif
readonly_data_section->unnamed.callback = avr_output_data_section_asm_op;
data_section->unnamed.callback = avr_output_data_section_asm_op;
bss_section->unnamed.callback = avr_output_bss_section_asm_op;
@@ -10036,7 +10038,10 @@ avr_asm_named_section (const char *name, unsigned int flags, tree decl)
|| STR_PREFIX_P (name, ".gnu.linkonce.d"));
if (!avr_need_copy_data_p
- && 0 == avr_arch->flash_pm_offset)
+#if defined HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH
+ && 0 == avr_arch->flash_pm_offset
+#endif
+ )
avr_need_copy_data_p = (STR_PREFIX_P (name, ".rodata")
|| STR_PREFIX_P (name, ".gnu.linkonce.r"));