]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
make.sh: Add CUSTOM_PATH option to lfsmake1
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 4 Feb 2022 16:47:43 +0000 (16:47 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 5 Feb 2022 12:13:21 +0000 (12:13 +0000)
This is required so that we use the host's tools to perform the
stripping.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index 5fb787d4377f986bdcc8068b544937bc81749423..447fa4651057bcb785f947b073b8104e2c880f44 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -663,8 +663,12 @@ lfsmake1() {
        lfsmakecommoncheck $*
        [ $? == 1 ] && return 0
 
+       if [ -n "${CUSTOM_PATH}" ]; then
+               local PATH="${CUSTOM_PATH}:${PATH}"
+       fi
+
        cd $BASEDIR/lfs && env -i \
-               PATH="${TOOLS_DIR}/ccache/bin:${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin:${PATH}" \
+               PATH="${PATH}" \
                CCACHE_DIR="${CCACHE_DIR}"/${BUILD_ARCH}/${TOOLCHAINVER} \
                CCACHE_TEMPDIR="${CCACHE_TEMPDIR}" \
                CCACHE_COMPILERCHECK="${CCACHE_COMPILERCHECK}" \
@@ -1062,7 +1066,7 @@ buildtoolchain() {
        lfsmake1 bison
        lfsmake1 flex
        lfsmake1 fake-environ
-       lfsmake1 strip
+       CUSTOM_PATH="${PATH}" lfsmake1 strip
        lfsmake1 cleanup-toolchain
 }