1.1 --- a/scripts/crosstool.sh Fri Oct 10 14:30:44 2008 +0000
1.2 +++ b/scripts/crosstool.sh Sun Oct 26 11:26:46 2008 +0000
1.3 @@ -23,12 +23,9 @@
1.4 CT_STAR_DATE=$(CT_DoDate +%s%N)
1.5 CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S)
1.6
1.7 -# Are we configured? We'll need that later...
1.8 -CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"
1.9 -
1.10 # Parse the configuration file
1.11 # It has some info about the logging facility, so include it early
1.12 -. "${CT_TOP_DIR}/.config"
1.13 +. .config
1.14
1.15 # Yes! We can do full logging from now on!
1.16 CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"
1.17 @@ -37,7 +34,7 @@
1.18 CT_DoExecLog DEBUG renice ${CT_NICE} $$
1.19
1.20 CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration"
1.21 -cat "${CT_TOP_DIR}/.config" |egrep '^(# |)CT_' |CT_DoLog DEBUG
1.22 +CT_DoExecLog DEBUG egrep '^(# |)CT_' .config
1.23 CT_EndStep
1.24
1.25 # Some sanity checks in the environment and needed tools
1.26 @@ -52,12 +49,21 @@
1.27 CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
1.28 CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
1.29 CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
1.30 -GREP_OPTIONS=
1.31 +export GREP_OPTIONS=
1.32
1.33 CT_DoLog INFO "Building environment variables"
1.34
1.35 -# Parse architecture-specific functions
1.36 +# Include sub-scripts instead of calling them: that way, we do not have to
1.37 +# export any variable, nor re-parse the configuration and functions files.
1.38 . "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
1.39 +. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
1.40 +. "${CT_LIB_DIR}/scripts/build/gmp.sh"
1.41 +. "${CT_LIB_DIR}/scripts/build/mpfr.sh"
1.42 +. "${CT_LIB_DIR}/scripts/build/binutils.sh"
1.43 +. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
1.44 +. "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
1.45 +. "${CT_LIB_DIR}/scripts/build/tools.sh"
1.46 +. "${CT_LIB_DIR}/scripts/build/debug.sh"
1.47
1.48 # Target tuple: CT_TARGET needs a little love:
1.49 CT_DoBuildTargetTuple
1.50 @@ -354,17 +360,6 @@
1.51 CT_EndStep
1.52 fi
1.53
1.54 -# Include sub-scripts instead of calling them: that way, we do not have to
1.55 -# export any variable, nor re-parse the configuration and functions files.
1.56 -. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
1.57 -. "${CT_LIB_DIR}/scripts/build/gmp.sh"
1.58 -. "${CT_LIB_DIR}/scripts/build/mpfr.sh"
1.59 -. "${CT_LIB_DIR}/scripts/build/binutils.sh"
1.60 -. "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
1.61 -. "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
1.62 -. "${CT_LIB_DIR}/scripts/build/tools.sh"
1.63 -. "${CT_LIB_DIR}/scripts/build/debug.sh"
1.64 -
1.65 if [ -z "${CT_RESTART}" ]; then
1.66 CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
1.67 do_kernel_get