From: Michael Tremer Date: Fri, 1 Dec 2017 16:31:25 +0000 (+0000) Subject: strip: Explicitely call right binaries X-Git-Tag: v2.19-core117~1^2~18 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=7b93b62bc8d82ee08a395ecaf7c4bac468f52f51 strip: Explicitely call right binaries Signed-off-by: Michael Tremer --- diff --git a/lfs/cleanup-toolchain b/lfs/cleanup-toolchain index 1c1fa8a50e..436c7dd521 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 9fbdf76274..084082e7b1 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 87125c0ded..bb80f3c052 100755 --- a/make.sh +++ b/make.sh @@ -947,6 +947,7 @@ buildtoolchain() { lfsmake1 texinfo lfsmake1 xz lfsmake1 fake-environ + lfsmake1 strip lfsmake1 cleanup-toolchain }