diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2025-08-20 10:53:37 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2025-08-20 11:17:34 +0200 |
commit | 0f15ff7b511493e9197e6153b794081c1557ba02 (patch) | |
tree | 68b6bbe947ff44f41c4e26db8f548b1ef16aec58 | |
parent | c548abddf5e0aa5cd3a9cd936f926dc1e2c7af7b (diff) | |
download | gcc-0f15ff7b511493e9197e6153b794081c1557ba02.zip gcc-0f15ff7b511493e9197e6153b794081c1557ba02.tar.gz gcc-0f15ff7b511493e9197e6153b794081c1557ba02.tar.bz2 |
AVR: target/121608 - Don't add --relax when linking with -r.
The linker rejects --relax in relocatable links (-r), hence only
add --relax when -r is not specified.
gcc/
PR target/121608
* config/avr/specs.h (LINK_RELAX_SPEC): Wrap in %{!r...}.
-rw-r--r-- | gcc/config/avr/specs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/avr/specs.h b/gcc/config/avr/specs.h index ff269bf..c95c758 100644 --- a/gcc/config/avr/specs.h +++ b/gcc/config/avr/specs.h @@ -57,7 +57,7 @@ along with GCC; see the file COPYING3. If not see "%(asm_errata_skip) " #define LINK_RELAX_SPEC \ - "%{mrelax:--relax} " + "%{!r:%{mrelax:--relax}} " #undef LINK_SPEC #define LINK_SPEC \ |