]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/cleanup-toolchain
cleanup-toolchain: Use TOOLCHAIN variable
[ipfire-2.x.git] / lfs / cleanup-toolchain
index 90369889d95e1539172c2fab9c09fc35423ddf7a..e4839b951289d08e99c076e29a9c00e2846eecec 100644 (file)
@@ -51,13 +51,8 @@ md5 :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-ifeq "$(PASS)" "1"
-       SPECS=$$(dirname $$(/tools/bin/$(CROSSTARGET)-gcc -print-libgcc-file-name))/specs; \
-       /tools/bin/$(CROSSTARGET)-gcc -dumpspecs | sed \
-               -e "/^\*cpp:$$/{n;s,$$, -isystem /tools/include,}" > $$SPECS
-endif
 
-ifeq "$(PASS)" "2"
+ifeq "$(TOOLCHAIN)" "1"
        # Remove the first cross compiler which is not needed anymore.
        find /tools/ -name "$(CROSSTARGET)*" | xargs rm -rfv
 
@@ -72,9 +67,7 @@ ifeq "$(PASS)" "2"
 
        # Update/create linker cache.
        /tools/sbin/ldconfig
-endif
-
-ifeq "$(PASS)" "3"
+else
        mv -v /tools/bin/{ld,ld-old}
        mv -v /tools/$(BUILDTARGET)/bin/{ld,ld-old}
        mv -v /tools/bin/{ld-new,ld}
@@ -86,4 +79,5 @@ ifeq "$(PASS)" "3"
                -e '/\*cpp:/{n;s@$$@ -isystem /usr/include@}' > \
                $$(dirname $$(gcc -print-libgcc-file-name))/specs
 endif
+
        @$(POSTBUILD)