]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
strip: Explicitely call right binaries
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 1 Dec 2017 16:31:25 +0000 (16:31 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 1 Dec 2017 16:31:25 +0000 (16:31 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/cleanup-toolchain
lfs/strip
make.sh

index 1c1fa8a50eda33426d99e0d3e8fe4aa142aa00e2..436c7dd521fd19090c661362bb29b80965855f65 100644 (file)
@@ -64,9 +64,6 @@ ifeq "$(TOOLCHAIN)" "1"
        # Remove man and info pages.
        rm -rfv $(TOOLS_DIR)/{,share}/{info,man}
 
-       # Strip all binaries.
-       STRIP="/usr/bin/strip" $(DIR_SRC)/src/stripper $(TOOLS_DIR)/
-
        # Fix ownership of the toolchain.
        chown -R root:root $(TOOLS_DIR)/
 
index 9fbdf762746271e2e9f33f97e93d84019d4d4d44..084082e7b17ded779b8c58f78cd8b906787ed553 100644 (file)
--- a/lfs/strip
+++ b/lfs/strip
@@ -29,6 +29,15 @@ VER = ipfire
 THISAPP    = strip
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
+ifeq "$(TOOLCHAIN)" "1"
+       SHELL = /bin/bash
+       STRIP = /usr/bin/strip
+       ROOT = $(TOOLS_DIR)
+else
+       SHELL = $(TOOLS_DIR)/bin/bash
+       STRIP = $(TOOLS_DIR)/bin/strip
+endif
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -49,6 +58,6 @@ $(TARGET) :
        # Don't strip VDR binaries, because they use a weird plugin system
        # which does not work when unneeded symbols get stripped from
        # /usr/sbin/vdr.
-       $(DIR_SRC)/src/stripper $(ROOT) \
+       STRIP=$(STRIP) $(SHELL) $(DIR_SRC)/src/stripper $(ROOT) \
                --exclude=/usr/src --exclude=$(TOOLS_DIR) \
                --exclude=/usr/sbin/vdr --exclude=/usr/lib/vdr
diff --git a/make.sh b/make.sh
index 87125c0ded8c3c26afd1e9b42aa95e4a9f9f4da5..bb80f3c052420f0f4cb106adf373b1f61d139601 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -947,6 +947,7 @@ buildtoolchain() {
        lfsmake1 texinfo
        lfsmake1 xz
        lfsmake1 fake-environ
+       lfsmake1 strip
        lfsmake1 cleanup-toolchain
 }