Skip to content

Commit 2e9a263

Browse files
keith-packardnashif
authored andcommitted
config/rx: Make linker scripts optional
These may not exist during the toolchain build, so check before using. Signed-off-by: Keith Packard <[email protected]>
1 parent 2ff87b1 commit 2e9a263

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

gcc/config/rx/rx.h

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,15 @@
109109
"
110110

111111
#undef LIB_SPEC
112-
#define LIB_SPEC " \
113-
--start-group \
114-
-lc \
115-
%{msim:-lsim}%{!msim:-lnosys} \
116-
%{fprofile-arcs|fprofile-generate|coverage:-lgcov} \
117-
--end-group \
118-
%{!r:%{!T*: %{msim:%Trx-sim.ld}%{!msim:%Trx.ld}}} \
119-
"
112+
#define LIB_SPEC \
113+
"--start-group " \
114+
"-lc " \
115+
"%{msim:-lsim}%{!msim:-lnosys} " \
116+
"%{fprofile-arcs|fprofile-generate|coverage:-lgcov} " \
117+
"--end-group " \
118+
"%{!r:%{!T*:" \
119+
"%{msim:%:if-exists-then-else(%:find-file(rx-sim.ld) %Trx-sim.ld)}" \
120+
"%{!msim:%:if-exists-then-else(%:find-file(rx.ld) %Trx.ld)}}}"
120121

121122
#undef LINK_SPEC
122123
#define LINK_SPEC "%{mbig-endian-data:--oformat elf32-rx-be} %{mrelax:-relax}"

0 commit comments

Comments
 (0)