diff options
Diffstat (limited to 'package/utils/busybox/Makefile')
-rw-r--r-- | package/utils/busybox/Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index e8d71670af..315dd42f8d 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox PKG_VERSION:=1.28.4 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -20,7 +20,6 @@ PKG_HASH:=e3c14a3699dc7e82fed397392957afc78e37bdf25398ac38ead6e84621b2ae6a PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 PKG_CHECK_FORMAT_SECURITY:=0 -PKG_INSTALL:=1 #Busybox use it's own PIE config flag and LDFLAGS are used with ld, not gcc. PKG_ASLR_PIE:=0 @@ -75,7 +74,10 @@ endef export KCONFIG_NOTIMESTAMP=1 +ifndef CONFIG_USE_MUSL LDLIBS:=m crypt +endif + LDLIBS += $(call BUSYBOX_IF_ENABLED,PAM,pam pam_misc pthread) ifdef CONFIG_BUSYBOX_USE_LIBRPC LDLIBS += rpc @@ -84,24 +86,32 @@ ifeq ($(CONFIG_USE_GLIBC),y) LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP_OPENWRT,resolv) endif +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -flto=jobserver -fuse-linker-plugin + MAKE_VARS := MAKE_FLAGS += \ EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ LDLIBS="$(LDLIBS)" \ + LD="$(TARGET_CC)" \ SKIP_STRIP=y ifneq ($(findstring c,$(OPENWRT_VERBOSE)),) MAKE_FLAGS += V=1 endif -MAKE_INSTALL_FLAGS += CONFIG_PREFIX="$(PKG_INSTALL_DIR)" - - define Build/Configure grep 'CONFIG_BUSYBOX_$(BUSYBOX_SYM)' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_BUSYBOX_$(BUSYBOX_SYM)_\\(.*\\),\\1CONFIG_\\2,g" > $(PKG_BUILD_DIR)/.config yes 'n' | $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS) oldconfig endef +define Build/Compile + $(call Build/Compile/Default, \ + CONFIG_PREFIX="$(PKG_INSTALL_DIR)" \ + all install \ + ) +endef + define Package/busybox/install $(INSTALL_DIR) $(1)/etc/init.d $(CP) $(PKG_INSTALL_DIR)/* $(1)/ |