X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=lfs%2Fstrip;h=48e698a7cfecbd4c08210da59271a67248102644;hb=9e245967d21883c6b921c0f1d9101a526ef9b084;hp=3ae1bde6f5241b69de99eab65661b2913b227c9f;hpb=fc44fa1f06fd8db9cdc3f37c29bb240024b10676;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/lfs/strip b/lfs/strip index 3ae1bde6f5..48e698a7cf 100644 --- a/lfs/strip +++ b/lfs/strip @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2018 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -29,6 +29,16 @@ 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 + ROOT = / +endif + ############################################################################### # Top-level Rules ############################################################################### @@ -46,4 +56,18 @@ md5 : ############################################################################### $(TARGET) : - STRIP="/tools/bin/strip" $(DIR_SRC)/src/stripper / + # 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. + STRIP=$(STRIP) $(SHELL) $(DIR_SRC)/src/stripper \ + $(ROOT) \ + --exclude=$(TOOLS_DIR) \ + --exclude=/dev \ + --exclude=/proc \ + --exclude=/sys \ + --exclude=/tmp \ + --exclude=/usr/src \ + --exclude=/usr/lib/vdr \ + --exclude=/usr/sbin/vdr \ + --exclude=/var/tmp \ + --exclude=/usr/lib/go