bzip2: fix hardening build
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 1 Jan 2019 23:22:41 +0000 (00:22 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Jan 2019 21:38:38 +0000 (22:38 +0100)
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@hauke-m.de>
package/utils/bzip2/Makefile

index 9b5b824e71dd86e6c719e68892f434d7859d3389..d26e21575713acada8f9181104d780af490d4f88 100644 (file)
@@ -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+= \