lua: add HOST_FPIC for host builds
authorPaul Spooren <mail@aparcar.org>
Fri, 31 Dec 2021 10:19:57 +0000 (10:19 +0000)
committerPaul Spooren <mail@aparcar.org>
Mon, 3 Jan 2022 09:34:31 +0000 (10:34 +0100)
Compiling without fPIC causes linking issues for packages using liblua.

Add $(HOST_FPIC) to host builds for both lua and lua5.3.

Suggested-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
package/utils/lua/Makefile
package/utils/lua5.3/Makefile

index e15142d8d26e988a6fa1cecf27a3f8fad368b980..279759e972d85bdd334ddeedd2e57fcef76e2ccc 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua
 PKG_VERSION:=5.1.5
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
@@ -125,7 +125,7 @@ endif
 
 define Host/Compile
        $(MAKE) -C $(HOST_BUILD_DIR) \
-               CC="$(HOSTCC) -std=gnu99" \
+               CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \
                $(LUA_OS)
 endef
 
index c9e9bebb1ac7ff3a984695006b3c6998f3e23cb8..19f3b4dfdad3dee62fc3f7eadd1c995b3558032a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua
 PKG_VERSION:=5.3.5
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
@@ -110,7 +110,7 @@ endif
 
 define Host/Compile
        $(MAKE) -C $(HOST_BUILD_DIR) \
-               CC="$(HOSTCC) -std=gnu99" \
+               CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \
                $(LUA_OS)
 endef