diff options
author | Bart vdr. Meulen <bartvdrmeulen@gmail.com> | 2010-04-20 10:06:04 +0200 |
---|---|---|
committer | Remy Bohmer <linux@bohmer.net> | 2010-04-20 10:06:04 +0200 |
commit | 76ae48462aa57967eaee73159b3792e389101a90 (patch) | |
tree | 42ffdaa60d21a2d068a2bff4634ceb924dfcc6ab | |
parent | a6da1aa63a7e74bfb7883facfa1616096381ac8e (diff) | |
download | crosstool-ng-76ae48462aa57967eaee73159b3792e389101a90.tar.gz crosstool-ng-76ae48462aa57967eaee73159b3792e389101a90.tar.bz2 crosstool-ng-76ae48462aa57967eaee73159b3792e389101a90.zip |
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>
-rw-r--r-- | scripts/build/cc/gcc.sh | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index ff8b9425..af940b83 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -41,35 +41,31 @@ do_cc_extract() { #------------------------------------------------------------------------------ # Core gcc pass 1 do_cc_core_pass_1() { - # If we're building a canadian compiler no use to build the CC - # core compiler, we're not using it - [ -n "${CT_CANADIAN}" ] && return 0 - # If we're building for bare metal, build the static core gcc, # with libgcc. + # In case we're not bare metal and building a canadian compiler, do nothing # In case we're not bare metal, and we're NPTL, build the static core gcc. # In any other case, do nothing. - case "${CT_BARE_METAL},${CT_THREADS}" in - y,*) do_cc_core mode=baremetal build_libgcc=yes;; - ,nptl) do_cc_core mode=static build_libgcc=no;; + case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in + y,*,*) do_cc_core mode=baremetal build_libgcc=yes;; + ,y,*) ;; + ,,nptl) do_cc_core mode=static build_libgcc=no;; *) ;; esac } # Core gcc pass 2 do_cc_core_pass_2() { - # If we're building a canadian compiler no use to build the CC - # core compiler, we're not using it - [ -n "${CT_CANADIAN}" ] && return 0 - # In case we're building for bare metal, do nothing, we already have # our compiler. + # In case we're not bare metal and building a canadian compiler, do nothing # In case we're NPTL, build the shared core gcc and the target libgcc. # In any other case, build the static core gcc and, if using gcc-4.3+, # also build the target libgcc. - case "${CT_BARE_METAL},${CT_THREADS}" in - y,*) ;; - ,nptl) + case "${CT_BARE_METAL},${CT_CANADIAN},${CT_THREADS}" in + y,*,*) ;; + ,y,*) ;; + ,,nptl) do_cc_core mode=shared build_libgcc=yes ;; *) if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then @@ -249,11 +245,6 @@ do_cc_core() { install_rules="install-gcc" fi # ! build libgcc - if [ "${CT_CANADIAN}" = "y" ]; then - CT_DoLog EXTRA "Building libiberty" - CT_DoExecLog ALL make ${PARALLELMFLAGS} all-build-libiberty - fi - CT_DoLog EXTRA "Building ${mode} core C compiler" CT_DoExecLog ALL make ${PARALLELMFLAGS} ${build_rules} |