busybox: add missing TARGET_CPPFLAGS and TARGET_LDFLAGS
Unconditionally pass TARGET_CPPFLAGS (not passed at all before) and TARGET_LDFLAGS (passed only in certain non-default configuration before the Makefile streamlining). Without these flags, hardening options (PKG_FORTIFY_SOURCE and PKG_RELRO) were not actually applied to busybox. The addition of these flags increases the size of the stripped busybox binary by about 6KB (~4KB with fortify headers, ~2KB with "-znow -zrelro") with the default hardening options PKG_FORTIFY_SOURCE_1 and PKG_RELRO_FULL. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
parent
a10fae1133
commit
20c349f68c
1 changed files with 3 additions and 2 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=busybox
|
PKG_NAME:=busybox
|
||||||
PKG_VERSION:=1.27.2
|
PKG_VERSION:=1.27.2
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
PKG_FLAGS:=essential
|
PKG_FLAGS:=essential
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
@ -83,7 +83,8 @@ endif
|
||||||
|
|
||||||
MAKE_VARS :=
|
MAKE_VARS :=
|
||||||
MAKE_FLAGS += \
|
MAKE_FLAGS += \
|
||||||
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
|
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||||
|
EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
LDLIBS="$(LDLIBS)" \
|
LDLIBS="$(LDLIBS)" \
|
||||||
SKIP_STRIP=y
|
SKIP_STRIP=y
|
||||||
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
|
||||||
|
|
Loading…
Reference in a new issue