Commit f78b344e authored by Gustavo Zacarias's avatar Gustavo Zacarias Committed by Peter Korsgaard
Browse files

sstrip: make it a proper package



* Convert sstrip to a proper gentargets package
* Use openwrt svn version, it's basically the same one we used
* Change the hooks from old toolchain/sstrip to new package/sstrip
* Drop the old toolchain/sstrip directory
* sstrip for the target is now in Package -> Development

Signed-off-by: default avatarGustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 6b0e9dd0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ endif
source "package/pkg-config/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/sed/Config.in"
endif
source "package/sstrip/Config.in"
if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
source "package/tar/Config.in"
endif
endmenu
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ ifeq ($(BR2_STRIP_sstrip),y)
STRIP_DISCARD_ALL:=
STRIP_STRIP_UNNEEDED:=
STRIP_STRIP_ALL:=
TARGET_STRIP=$(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
TARGET_STRIP=$(HOST_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-sstrip
STRIPCMD=$(TARGET_STRIP)
KSTRIPCMD=$(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded
endif
+7 −0
Original line number Diff line number Diff line
config BR2_PACKAGE_SSTRIP
	bool "sstrip"
	help
	  Small utility that removes a few bytes from an executable that
	  strip leaves behind.

	  http://www.muppetlabs.com/~breadbox/software/elfkickers.html
+45 −0
Original line number Diff line number Diff line
############################################################
#
# sstrip
#
############################################################

SSTRIP_SITE = svn://dev.openwrt.org/openwrt/trunk/tools/sstrip
SSTRIP_VERSION = 20154
HOST_SSTRIP_BINARY = $(REAL_GNU_TARGET_NAME)-sstrip

# This is a kludge to get host-ccache built before us or it fails
ifeq ($(BR2_CCACHE),y)
HOST_SSTRIP_DEPENDENCIES = host-ccache
endif

define SSTRIP_BUILD_CMDS
	cd $(@D) ; \
	$(TARGET_CC) $(TARGET_CFLAGS) -include endian.h -include byteswap.h \
		-o sstrip src/sstrip.c
endef

define SSTRIP_INSTALL_TARGET_CMDS
	$(INSTALL) -D $(@D)/sstrip $(TARGET_DIR)/usr/bin/sstrip
endef

define SSTRIP_UNINSTALL_TARGET_CMDS
	rm -f $(TARGET_DIR)/usr/bin/sstrip
endef

define HOST_SSTRIP_BUILD_CMDS
	cd $(@D) ; \
	$(HOSTCC) $(HOST_CFLAGS) -include endian.h -include byteswap.h \
		-o sstrip src/sstrip.c
endef

define HOST_SSTRIP_INSTALL_CMDS
	$(INSTALL) -D $(@D)/sstrip $(HOST_DIR)/usr/bin/$(HOST_SSTRIP_BINARY)
endef

define HOST_SSTRIP_UNINSTALL_CMDS
	rm -f $(HOST_DIR)/usr/bin/$(HOST_SSTRIP_BINARY)
endef

$(eval $(call GENTARGETS,package,sstrip))
$(eval $(call GENTARGETS,package,sstrip,host))
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@

DEPENDENCIES_HOST_PREREQ:=
ifeq ($(BR2_STRIP_sstrip),y)
DEPENDENCIES_HOST_PREREQ+=sstrip_host
DEPENDENCIES_HOST_PREREQ+=host-sstrip
endif

# Remove duplicate entries from $(DL_TOOLS_DEPENDENCIES)
Loading