[OpenWrt-Devel] [PATCH 1/3] bzip2: fix hardening build

Hauke Mehrtens hauke at hauke-m.de
Wed Jan 2 12:18:33 EST 2019


Set the LDFLAGS otherwise it will not get the target hardening flags or
any other generic flags provided in the LDFLAGS

Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/utils/bzip2/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/utils/bzip2/Makefile b/package/utils/bzip2/Makefile
index 9b5b824e71..d26e215757 100644
--- a/package/utils/bzip2/Makefile
+++ b/package/utils/bzip2/Makefile
@@ -56,14 +56,14 @@ define Package/bzip2/description
 endef
 
 TARGET_CFLAGS += \
-	$(FPIC) \
-	$(TARGET_LDFLAGS)
+	$(FPIC)
 
 CONFIGURE_ARGS += --prefix=/usr
 
 MAKE_FLAGS += \
 	-f Makefile-libbz2_so \
 	CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" \
 	all
 
 define Build/InstallDev
@@ -89,11 +89,11 @@ define Package/bzip2/install
 endef
 
 HOST_CFLAGS += \
-	$(FPIC) \
-	$(HOST_LDFLAGS)
+	$(FPIC)
 
 HOST_MAKE_FLAGS+= \
 	CFLAGS="$(HOST_CFLAGS)" \
+	LDFLAGS="$(HOST_LDFLAGS)" \
 	all
 
 HOST_CONFIGURE_ARGS+= \
-- 
2.19.2


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list