cc/gcc: allow building a canadian bare-metal compiler
authorRemy Bohmer <linux@bohmer.net>
Tue Apr 20 10:06:04 2010 +0200 (2010-04-20)
changeset 192521907956ad16
parent 1924 214c64ba8b21
child 1926 e6a9a4f36645
cc/gcc: allow building a canadian bare-metal compiler

Previous addition of the canadian cross compiler did not allow
to build a baremetal only variant, no reason why this is not
allowed

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
scripts/build/cc/gcc.sh
     1.1 --- a/scripts/build/cc/gcc.sh	Tue Apr 20 11:39:13 2010 +0200
     1.2 +++ b/scripts/build/cc/gcc.sh	Tue Apr 20 10:06:04 2010 +0200
     1.3 @@ -41,35 +41,31 @@
     1.4  #------------------------------------------------------------------------------
     1.5  # Core gcc pass 1
     1.6  do_cc_core_pass_1() {
     1.7 -    # If we're building a canadian compiler no use to build the CC
     1.8 -    # core compiler, we're not using it
     1.9 -    [ -n "${CT_CANADIAN}" ] && return 0
    1.10 -
    1.11      # If we're building for bare metal, build the static core gcc,
    1.12      # with libgcc.
    1.13 +    # In case we're not bare metal and building a canadian compiler, do nothing
    1.14      # In case we're not bare metal, and we're NPTL, build the static core gcc.
    1.15      # In any other case, do nothing.
    1.16 -    case "${CT_BARE_METAL},${CT_THREADS}" in
    1.17 -        y,*)    do_cc_core mode=baremetal build_libgcc=yes;;
    1.18 -        ,nptl)  do_cc_core mode=static build_libgcc=no;;
    1.19 +    case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in
    1.20 +        y,*,*)  do_cc_core mode=baremetal build_libgcc=yes;;
    1.21 +        ,y,*)   ;;
    1.22 +        ,,nptl) do_cc_core mode=static build_libgcc=no;;
    1.23          *)      ;;
    1.24      esac
    1.25  }
    1.26  
    1.27  # Core gcc pass 2
    1.28  do_cc_core_pass_2() {
    1.29 -    # If we're building a canadian compiler no use to build the CC
    1.30 -    # core compiler, we're not using it
    1.31 -    [ -n "${CT_CANADIAN}" ] && return 0
    1.32 -
    1.33      # In case we're building for bare metal, do nothing, we already have
    1.34      # our compiler.
    1.35 +    # In case we're not bare metal and building a canadian compiler, do nothing
    1.36      # In case we're NPTL, build the shared core gcc and the target libgcc.
    1.37      # In any other case, build the static core gcc and, if using gcc-4.3+,
    1.38      # also build the target libgcc.
    1.39 -    case "${CT_BARE_METAL},${CT_THREADS}" in
    1.40 -        y,*)    ;;
    1.41 -        ,nptl)
    1.42 +    case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in
    1.43 +        y,*,*)   ;;
    1.44 +        ,y,*)    ;;
    1.45 +        ,,nptl)
    1.46              do_cc_core mode=shared build_libgcc=yes
    1.47              ;;
    1.48          *)  if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then
    1.49 @@ -249,11 +245,6 @@
    1.50              install_rules="install-gcc"
    1.51      fi   # ! build libgcc
    1.52  
    1.53 -    if [ "${CT_CANADIAN}" = "y" ]; then
    1.54 -        CT_DoLog EXTRA "Building libiberty"
    1.55 -        CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty
    1.56 -    fi
    1.57 -
    1.58      CT_DoLog EXTRA "Building ${mode} core C compiler"
    1.59      CT_DoExecLog ALL make ${PARALLELMFLAGS} ${build_rules}
    1.60