diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-06-13 20:43:02 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-06-13 20:43:02 +0200 |
commit | 399e7f8f8a1693b6126a5a3ca4089b90b9b0f4c6 (patch) | |
tree | 9a972db5e59c82d5aa6d22f4c7f5647b4c34eb33 /scripts/build/cc | |
parent | 3983fe11846645c594c75585ad09fd905e0e58ff (diff) | |
download | crosstool-ng-399e7f8f8a1693b6126a5a3ca4089b90b9b0f4c6.tar.gz crosstool-ng-399e7f8f8a1693b6126a5a3ca4089b90b9b0f4c6.tar.bz2 crosstool-ng-399e7f8f8a1693b6126a5a3ca4089b90b9b0f4c6.zip |
cc/gcc: store core build rules in an array
Using an array makes it easier to add new rules.
Besides, it is easy to expand from build rules to install rules
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 7228b155..3669e1ea 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -92,6 +92,7 @@ do_cc_core() { local tmp local -a extra_config local core_LDFLAGS + local -a core_targets while [ $# -ne 0 ]; do eval "${1}" @@ -233,12 +234,10 @@ do_cc_core() { if [ "${CT_CC_GCC_4_3_or_later}" = "y" ]; then libgcc_rule="libgcc.mvars" - build_rules="all-gcc all-target-libgcc" - install_rules="install-gcc install-target-libgcc" + core_targets=( gcc target-libgcc ) else libgcc_rule="libgcc.mk" - build_rules="all-gcc" - install_rules="install-gcc" + core_targets=( gcc ) fi # On bare metal and canadian build the host-compiler is used when @@ -256,15 +255,14 @@ do_cc_core() { ${repair_cc} sed -r -i -e 's@-lc@@g' gcc/${libgcc_rule} else # build_libgcc - build_rules="all-gcc" - install_rules="install-gcc" + core_targets=( gcc ) fi # ! build libgcc CT_DoLog EXTRA "Building ${mode} core C compiler" - CT_DoExecLog ALL make ${PARALLELMFLAGS} ${build_rules} + CT_DoExecLog ALL make ${PARALLELMFLAGS} "${core_targets[@]/#/all-}" CT_DoLog EXTRA "Installing ${mode} core C compiler" - CT_DoExecLog ALL make ${install_rules} + CT_DoExecLog ALL make "${core_targets[@]/#/install-}" # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able # to call the C compiler with the same, somewhat canonical name. |