io: Add TARGET_LDFLAGS to fix PIE
authorHauke Mehrtens <hauke.mehrtens@intel.com>
Thu, 7 Nov 2019 20:06:04 +0000 (21:06 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 13 Nov 2019 22:25:03 +0000 (23:25 +0100)
Add the OpenWrt TARGET_LDFLAGS to the compile command to activate PIE support
for the io tool when it is activated globally in OpenWrt.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
utils/io/Makefile

index c572554d038a6f59da0922dd9a8fc2200041c1da..b588b33472031be8503919493f4d877797e44b32 100644 (file)
@@ -6,7 +6,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=io
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -25,7 +25,8 @@ define Package/io/description
 endef
 
 define Build/Compile
-       $(TARGET_CC) $(TARGET_CFLAGS) -Wall $(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
+       $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -Wall \
+               $(PKG_BUILD_DIR)/io.c -o $(PKG_BUILD_DIR)/$(PKG_NAME)
 endef
 
 define Package/io/install