]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
cleanup-toolchain: Use TOOLCHAIN variable
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Apr 2017 11:42:46 +0000 (13:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 18 May 2017 11:01:51 +0000 (12:01 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/cleanup-toolchain
make.sh

index e904bca87a79fb05172da16a0d90205309824d38..e4839b951289d08e99c076e29a9c00e2846eecec 100644 (file)
@@ -51,7 +51,8 @@ md5 :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-ifeq "$(PASS)" "1"
+
+ifeq "$(TOOLCHAIN)" "1"
        # Remove the first cross compiler which is not needed anymore.
        find /tools/ -name "$(CROSSTARGET)*" | xargs rm -rfv
 
@@ -66,9 +67,7 @@ ifeq "$(PASS)" "1"
 
        # Update/create linker cache.
        /tools/sbin/ldconfig
-endif
-
-ifeq "$(PASS)" "2"
+else
        mv -v /tools/bin/{ld,ld-old}
        mv -v /tools/$(BUILDTARGET)/bin/{ld,ld-old}
        mv -v /tools/bin/{ld-new,ld}
@@ -80,4 +79,5 @@ ifeq "$(PASS)" "2"
                -e '/\*cpp:/{n;s@$$@ -isystem /usr/include@}' > \
                $$(dirname $$(gcc -print-libgcc-file-name))/specs
 endif
+
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index fc1a02b33f5074c27456cc48aa934be0a1eb8e82..3a62c4f7715530f3153b16a4df72f7711f3875ea 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -316,7 +316,7 @@ buildtoolchain() {
     lfsmake1 texinfo
     lfsmake1 xz
     lfsmake1 fake-environ
-    lfsmake1 cleanup-toolchain         PASS=1
+    lfsmake1 cleanup-toolchain
 }
 
 buildbase() {
@@ -327,7 +327,7 @@ buildbase() {
     lfsmake2 man-pages
     lfsmake2 glibc
     lfsmake2 tzdata
-    lfsmake2 cleanup-toolchain         PASS=2
+    lfsmake2 cleanup-toolchain
     lfsmake2 zlib
     lfsmake2 binutils
     lfsmake2 gmp