diff options
author | Ray Donnelly <mingw.android@gmail.com> | 2015-05-29 21:40:47 +0100 |
---|---|---|
committer | Ray Donnelly <mingw.android@gmail.com> | 2015-05-29 21:49:32 +0100 |
commit | 3049c4c1e2483c4109add23738ec838baf42c56e (patch) | |
tree | 937a5993a4adad5e69f6dd2b3a4673591a37420b /scripts | |
parent | a878419d5aa7139adad39ba006065e6898907083 (diff) | |
download | crosstool-ng-3049c4c1e2483c4109add23738ec838baf42c56e.tar.gz crosstool-ng-3049c4c1e2483c4109add23738ec838baf42c56e.tar.bz2 crosstool-ng-3049c4c1e2483c4109add23738ec838baf42c56e.zip |
multi_cc: Prepare ct-ng for multiple compilers
This commit moves gcc.sh to 100-gcc.sh to accomodate for other
cross-compilers that crosstool-ng might be able to build.
The first, to come soon, is llvm/clang.
Signed-off-by: Ray Donnelly <mingw.android@gmail.com>
Reviewed-by: Bryan Hundven <bryanhundven@gmail.com>
Reviewed-by: Yann Diorcet <diorcetyann@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/cc.sh | 58 | ||||
-rw-r--r-- | scripts/build/cc/100-gcc.sh (renamed from scripts/build/cc/gcc.sh) | 0 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh.in | 2 |
3 files changed, 59 insertions, 1 deletions
diff --git a/scripts/build/cc.sh b/scripts/build/cc.sh new file mode 100644 index 00000000..3c8aaefc --- /dev/null +++ b/scripts/build/cc.sh @@ -0,0 +1,58 @@ +# Wrapper to build the companion tools facilities + +# List all companion tools facilities, and parse their scripts +CT_CC_FACILITY_LIST= +for f in "${CT_LIB_DIR}/scripts/build/cc/"*.sh; do + _f="$(basename "${f}" .sh)" + _f="${_f#???-}" + __f="CT_CC_${_f}" + if [ "${!__f}" = "y" ]; then + CT_DoLog DEBUG "Enabling cc '${_f}'" + . "${f}" + CT_CC_FACILITY_LIST="${CT_CC_FACILITY_LIST} ${_f}" + else + CT_DoLog DEBUG "Disabling cc '${_f}'" + fi +done + +# Download the cc facilities +do_cc_get() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_get + done +} + +# Extract and patch the cc facilities +do_cc_extract() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_extract + done +} + +# Core pass 1 the cc facilities +do_cc_core_pass_1() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_core_pass_1 + done +} + +# Core pass 2 the cc facilities +do_cc_core_pass_2() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_core_pass_2 + done +} + +# Build for build the cc facilities +do_cc_for_build() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_for_build + done +} + +# Build for host the cc facilities +do_cc_for_host() { + for f in ${CT_CC_FACILITY_LIST}; do + do_${f}_for_host + done +} diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/100-gcc.sh index 835aea06..835aea06 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/100-gcc.sh diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index e1018566..78abd96b 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -143,7 +143,7 @@ CT_DoLog INFO "Building environment variables" . "${CT_LIB_DIR}/scripts/build/companion_libs.sh" . "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh" . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh" -. "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh" +. "${CT_LIB_DIR}/scripts/build/cc.sh" . "${CT_LIB_DIR}/scripts/build/debug.sh" . "${CT_LIB_DIR}/scripts/build/test_suite.sh" |