pixiewps: use compiler, linker options of the build system
authorYousong Zhou <yszhou4tech@gmail.com>
Sun, 11 Feb 2018 04:05:56 +0000 (12:05 +0800)
committerYousong Zhou <yszhou4tech@gmail.com>
Sun, 11 Feb 2018 04:10:07 +0000 (12:10 +0800)
pixiewps has its own CFLAGS setting and uses LDFLAGS from
environment variable.  When PKG_ALSR_PIE was enabled, objects were not
compiled with -fPIC supplied from the build system and the final link
step would fail because of the -pie option

Fixes #5590

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
net/pixiewps/Makefile

index a07313285027a95a2286ae76dabea630f1f71f25..9d5fd41c2c14b0ce2327a8fe23063eace2d2484b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2017 Yousong Zhou
+# Copyright (C) 2017-2018 Yousong Zhou
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pixiewps
 PKG_VERSION:=1.4.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech@gmail.com>
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
@@ -35,6 +35,12 @@ define Package/pixiewps/description
   meant for educational purposes only.
 endef
 
+# override flags by pixiewps' own Makefile
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
+       CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
+       LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
+
 define Package/pixiewps/install
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/pixiewps $(1)/usr/bin/