aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2019-11-20 08:19:44 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2019-11-20 08:19:44 +0000
commitc04341ec45cf332e4f1a7057a6cdb461629275ab (patch)
treeb6391d2097c1cbcadccb7835bd657e7248f6ebbd /gcc/config
parent3e00ba47b932a13b57061b2d2c95c768ab811d1b (diff)
downloadgcc-c04341ec45cf332e4f1a7057a6cdb461629275ab.zip
gcc-c04341ec45cf332e4f1a7057a6cdb461629275ab.tar.gz
gcc-c04341ec45cf332e4f1a7057a6cdb461629275ab.tar.bz2
Make 0-series device specs work with older versions of avr-gcc.
PR target/92545 * config/avr/specs.h (LINK_SPEC) <%(link_pm_base_address)>: Remove. * config/avr/gen-avr-mmcu-specs.c (print_mcu) <*link_pm_base_address>: Don't write spec. <*link_arch>: Add --defsym=__RODATA_PM_OFFSET__= as needed. From-SVN: r278478
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/avr/gen-avr-mmcu-specs.c14
-rw-r--r--gcc/config/avr/specs.h1
2 files changed, 5 insertions, 10 deletions
diff --git a/gcc/config/avr/gen-avr-mmcu-specs.c b/gcc/config/avr/gen-avr-mmcu-specs.c
index f629db4..363d703 100644
--- a/gcc/config/avr/gen-avr-mmcu-specs.c
+++ b/gcc/config/avr/gen-avr-mmcu-specs.c
@@ -253,7 +253,11 @@ print_mcu (const avr_mcu_t *mcu)
fprintf (f, "*link_relax:\n\t%s\n\n", LINK_RELAX_SPEC);
- fprintf (f, "*link_arch:\n\t%s\n\n", LINK_ARCH_SPEC);
+ fprintf (f, "*link_arch:\n\t%s", LINK_ARCH_SPEC);
+ if (is_device
+ && flash_pm_offset)
+ fprintf (f, " --defsym=__RODATA_PM_OFFSET__=0x%x", flash_pm_offset);
+ fprintf (f, "\n\n");
if (is_device)
{
@@ -270,14 +274,6 @@ print_mcu (const avr_mcu_t *mcu)
fprintf (f, "\n\n");
}
- if (is_device
- && flash_pm_offset)
- {
- fprintf (f, "*link_pm_base_address:\n");
- fprintf (f, "\t--defsym=__RODATA_PM_OFFSET__=0x%x", flash_pm_offset);
- fprintf (f, "\n\n");
- }
-
// Specs known to GCC.
if (is_device)
diff --git a/gcc/config/avr/specs.h b/gcc/config/avr/specs.h
index b6fe4c8..736ff62 100644
--- a/gcc/config/avr/specs.h
+++ b/gcc/config/avr/specs.h
@@ -68,7 +68,6 @@ along with GCC; see the file COPYING3. If not see
"%(link_text_start) " \
"%(link_relax) " \
"%(link_pmem_wrap) " \
- "%(link_pm_base_address) " \
"%{shared:%eshared is not supported} "
#undef LIB_SPEC