summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-12-14 08:59:08 (GMT)
committerAlexey Neyman <stilor@att.net>2017-01-20 02:08:29 (GMT)
commit832bee87c03ce2fecdbf8b00996fc1fca8f2b2e0 (patch)
tree73691e8beb7531585f5b323affd8a93a207f378c /scripts/crosstool-NG.sh.in
parent7fad3936351bc145630ec882a92063153d601d4d (diff)
Make build-all rely on kconfig options.
For that, make CT_BUILD_TOP_DIR a non-settable config option (so that it is recursively expanded with CT_HOST/CT_TARGET). Use a common prefix, with same default as for regular sample build. Use showConfig.sh to determine host toolchain path (for canadian crosses) and build directory to be removed. Remove LIBC_SYSROOT_ARG (unused). Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in12
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 303e5fc..eeb7800 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -19,12 +19,12 @@
# - don't hash commands lookups,
. "${CT_LIB_DIR}/scripts/functions"
-# Yes! We can do full logging from now on!
-CT_LogEnable
-
# Read the sample settings
CT_LoadConfig
+# Yes! We can do full logging from now on!
+CT_LogEnable
+
# Check running as root
if [ -z "${CT_ALLOW_BUILD_AS_ROOT_SURE}" ]; then
if [ $(id -u) -eq 0 ]; then
@@ -156,8 +156,8 @@ CT_PKGVERSION="crosstool-NG ${CT_VERSION}${CT_TOOLCHAIN_PKGVERSION:+ - ${CT_TOOL
# Compute the working directories names
CT_TARBALLS_DIR="${CT_WORK_DIR}/tarballs"
CT_SRC_DIR="${CT_WORK_DIR}/src"
-CT_BUILD_DIR="${CT_WORK_DIR}/${CT_TARGET}/build"
-CT_BUILDTOOLS_PREFIX_DIR="${CT_WORK_DIR}/${CT_TARGET}/buildtools"
+CT_BUILD_DIR="${CT_BUILD_TOP_DIR}/build"
+CT_BUILDTOOLS_PREFIX_DIR="${CT_BUILD_TOP_DIR}/buildtools"
CT_STATE_DIR="${CT_WORK_DIR}/${CT_TARGET}/state"
# Note about HOST_COMPLIBS_DIR: it's always gonna be in the buildtools dir, or a
# sub-dir. So we won't have to save/restore it, not even create it.
@@ -288,7 +288,6 @@ if [ -z "${CT_RESTART}" ]; then
BINUTILS_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
CC_CORE_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
CC_SYSROOT_ARG="--with-sysroot=${CT_SYSROOT_DIR}"
- LIBC_SYSROOT_ARG=""
# glibc's prefix must be exactly /usr, else --with-sysroot'd gcc will get
# confused when $sysroot/usr/include is not present.
# Note: --prefix=/usr is magic!
@@ -307,7 +306,6 @@ if [ -z "${CT_RESTART}" ]; then
# building libgcc, and you'll have no profiling
CC_CORE_SYSROOT_ARG="--without-headers"
CC_SYSROOT_ARG="--with-headers=${CT_HEADERS_DIR}"
- LIBC_SYSROOT_ARG="prefix="
fi
CT_DoExecLog ALL mkdir -p "${CT_SYSROOT_DIR}"
CT_DoExecLog ALL mkdir -p "${CT_DEBUGROOT_DIR}"