summaryrefslogtreecommitdiff
path: root/scripts/crosstool.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-23 13:45:48 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-23 13:45:48 (GMT)
commit1c625d676cb8703fbf8956bc87d90bf5cdf21d89 (patch)
tree2f8c3bd3c0a883a90414fb8a1f465ccbae5d104d /scripts/crosstool.sh
parent58e57f180c46d4ad470d63b3a6033af3a395dabd (diff)
Push the calculation of the tuple's kernel part down to kernel's build scripts:
- update the kernel script's API with the function CT_DiKernelTupleValues - update doc accordingly (also with the architecture change, missing in the previous commit) - small clean-up in the main script, remove useless test /trunk/scripts/build/kernel/bare-metal.sh | 5 5 0 0 +++++ /trunk/scripts/build/kernel/linux.sh | 5 5 0 0 +++++ /trunk/scripts/crosstool.sh | 31 13 18 0 +++++++++++++------------------ /trunk/scripts/functions | 15 8 7 0 ++++++++------- /trunk/docs/overview.txt | 13 9 4 0 +++++++++---- 5 files changed, 40 insertions(+), 29 deletions(-)
Diffstat (limited to 'scripts/crosstool.sh')
-rwxr-xr-xscripts/crosstool.sh31
1 files changed, 13 insertions, 18 deletions
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index cc4ed2a..d688c28 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -23,12 +23,9 @@
CT_STAR_DATE=$(CT_DoDate +%s%N)
CT_STAR_DATE_HUMAN=$(CT_DoDate +%Y%m%d.%H%M%S)
-# Are we configured? We'll need that later...
-CT_TestOrAbort "Configuration file not found. Please create one." -f "${CT_TOP_DIR}/.config"
-
# Parse the configuration file
# It has some info about the logging facility, so include it early
-. "${CT_TOP_DIR}/.config"
+. .config
# Yes! We can do full logging from now on!
CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"
@@ -37,7 +34,7 @@ CT_DoLog INFO "Build started ${CT_STAR_DATE_HUMAN}"
CT_DoExecLog DEBUG renice ${CT_NICE} $$
CT_DoStep DEBUG "Dumping user-supplied crosstool-NG configuration"
-cat "${CT_TOP_DIR}/.config" |egrep '^(# |)CT_' |CT_DoLog DEBUG
+CT_DoExecLog DEBUG egrep '^(# |)CT_' .config
CT_EndStep
# Some sanity checks in the environment and needed tools
@@ -52,12 +49,21 @@ CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LI
CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
-GREP_OPTIONS=
+export GREP_OPTIONS=
CT_DoLog INFO "Building environment variables"
-# Parse architecture-specific functions
+# Include sub-scripts instead of calling them: that way, we do not have to
+# export any variable, nor re-parse the configuration and functions files.
. "${CT_LIB_DIR}/scripts/build/arch/${CT_ARCH}.sh"
+. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
+. "${CT_LIB_DIR}/scripts/build/gmp.sh"
+. "${CT_LIB_DIR}/scripts/build/mpfr.sh"
+. "${CT_LIB_DIR}/scripts/build/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/tools.sh"
+. "${CT_LIB_DIR}/scripts/build/debug.sh"
# Target tuple: CT_TARGET needs a little love:
CT_DoBuildTargetTuple
@@ -354,17 +360,6 @@ if [ -z "${CT_RESTART}" ]; then
CT_EndStep
fi
-# Include sub-scripts instead of calling them: that way, we do not have to
-# export any variable, nor re-parse the configuration and functions files.
-. "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
-. "${CT_LIB_DIR}/scripts/build/gmp.sh"
-. "${CT_LIB_DIR}/scripts/build/mpfr.sh"
-. "${CT_LIB_DIR}/scripts/build/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/tools.sh"
-. "${CT_LIB_DIR}/scripts/build/debug.sh"
-
if [ -z "${CT_RESTART}" ]; then
CT_DoStep INFO "Retrieving needed toolchain components' tarballs"
do_kernel_get