scripts/build/cc/gcc.sh
changeset 1926 e6a9a4f36645
parent 1925 21907956ad16
child 1972 7939e7e0573d
child 1996 f4373f8b758d
     1.1 --- a/scripts/build/cc/gcc.sh	Tue Apr 20 10:06:04 2010 +0200
     1.2 +++ b/scripts/build/cc/gcc.sh	Fri Apr 09 21:04:37 2010 +0200
     1.3 @@ -238,7 +238,19 @@
     1.4              install_rules="install-gcc"
     1.5          fi
     1.6  
     1.7 -        CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule}
     1.8 +        # On bare metal and canadian build the host-compiler is used when
     1.9 +        # actually the build-system compiler is required. Choose the correct
    1.10 +        # compilers for canadian build and use the defaults on other
    1.11 +        # configurations.
    1.12 +        if [ "${CT_BARE_METAL},${CT_CANADIAN}" = "y,y" ]; then
    1.13 +            repair_cc="CC_FOR_BUILD=${CT_BUILD}-gcc \
    1.14 +                       GCC_FOR_TARGET=${CT_TARGET}-gcc"
    1.15 +        else
    1.16 +            repair_cc=""
    1.17 +        fi
    1.18 +
    1.19 +        CT_DoExecLog ALL make ${PARALLELMFLAGS} -C gcc ${libgcc_rule} \
    1.20 +                              ${repair_cc}
    1.21          sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule}
    1.22      else # build_libgcc
    1.23              build_rules="all-gcc"