Skip to content

Commit e311982

Browse files
committed
gcc: Support Canadian cross builds on microblazeel
Picolibc uses the linker during the build process to construct crt0.o files, but the microblazeel spec from gcc adds -dT xilinx.ld when no -T argument is provided to introduce default linking parameters. However, during a Canadian cross build, the xilinx.ld file isn't installed before picolibc gets built causing the build to fail. Fix this by making the presence of the xilinx.ld file optional; if it isn't available, then don't use it. This took two checks as the spec file conditionals can only insert a single argument and we need two, the -dT and the full path to the script. Signed-off-by: Keith Packard <[email protected]>
1 parent 428d8d7 commit e311982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gcc/config/microblaze/microblaze.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ extern enum pipeline_type microblaze_pipe;
115115
%{Zxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
116116
%{mxl-mode-xmdstub:-defsym _TEXT_START_ADDR=0x800} \
117117
%{mxl-gp-opt:%{G*}} %{!mxl-gp-opt: -G 0} \
118-
%{!T*: -dT xilinx.ld%s}"
118+
%{!T*: %:if-exists-then-else(xilinx.ld%s -dT) %:if-exists(xilinx.ld%s)}"
119119

120120
/* Specs for the compiler proper */
121121

0 commit comments

Comments
 (0)