path: root/scripts/build
diff options
authorRemy Bohmer <>2010-04-09 19:04:37 (GMT)
committerRemy Bohmer <>2010-04-09 19:04:37 (GMT)
commit9c6c090d7b6f5a03213b8ac6bd33a5cb812ec4c4 (patch)
tree1cd8ec3358f24ff0e640a9f311c304659dd8adb3 /scripts/build
parent76ae48462aa57967eaee73159b3792e389101a90 (diff)
cc/gcc: use proper host compiler for canadian bare-metal
While compiling a canadian toolchain for host=mingw32, build=linux, target=m68k-elf the build fails because in this step of the gcc build the Host compiler is used in this stage with the build-flags for the build system. This results in an error where the header <sys/wait.h> cannot be found. This problem happens at least in the GCC-4.3.x and GCC-4.4.x range. This is solved by passing the proper compilers on the Make cmd-line Signed-off-by: Remy Bohmer <>
Diffstat (limited to 'scripts/build')
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/build/cc/ b/scripts/build/cc/
index af940b8..fae185e 100644
--- a/scripts/build/cc/
+++ b/scripts/build/cc/
@@ -238,7 +238,19 @@ do_cc_core() {
- CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule}
+ # On bare metal and canadian build the host-compiler is used when
+ # actually the build-system compiler is required. Choose the correct
+ # compilers for canadian build and use the defaults on other
+ # configurations.
+ if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
+ repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
+ else
+ repair_cc=""
+ fi
+ CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule} \
+ ${repair_cc}
sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
else # build_libgcc