diff --git a/lfs/cleanup-toolchain b/lfs/cleanup-toolchain index 1c1fa8a50..436c7dd52 100644 --- a/lfs/cleanup-toolchain +++ b/lfs/cleanup-toolchain @@ -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)/ diff --git a/lfs/strip b/lfs/strip index 9fbdf7627..084082e7b 100644 --- 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 87125c0de..bb80f3c05 100755 --- a/make.sh +++ b/make.sh @@ -947,6 +947,7 @@ buildtoolchain() { lfsmake1 texinfo lfsmake1 xz lfsmake1 fake-environ + lfsmake1 strip lfsmake1 cleanup-toolchain }