scripts/toolchain-config.in
author Remy Bohmer <linux@bohmer.net>
Fri Apr 09 21:04:37 2010 +0200 (2010-04-09)
changeset 1926 e6a9a4f36645
parent 1098 035f231898cc
child 2614 814ea73df7e0
permissions -rw-r--r--
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 <linux@bohmer.net>
     1 #!/bin/sh
     2 
     3 SKIP_ME="### CT_NG SKIP ME ###"
     4 skip_me=$(($(cat "${0}" |@@grep@@ --binary-files=text -o -b -E "^${SKIP_ME}$" |cut -d : -f 1)+${#SKIP_ME}+1))
     5 dd if="${0}" bs=${skip_me} skip=1 2>/dev/null |bzcat
     6 exit 0
     7 
     8 ### CT_NG SKIP ME ###