From e3f1532297bdc0fb1fb9bacd1a51405753d332f9 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 3 Apr 2019 14:43:10 -0300 Subject: [PATCH 1/2] luasec: use gcc to link instead of ld Linking with ld is not portable and was causing problems for some targets, e.g. i386_pentium4: i486-openwrt-linux-musl-ld: x509.o: in function `push_asn1_objname': x509.c:(.text+0x61): undefined reference to `__stack_chk_fail_local' ... Signed-off-by: Eneas U de Queiroz --- lang/luasec/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile index 29c120e1a..79120bbc4 100644 --- a/lang/luasec/Makefile +++ b/lang/luasec/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luasec PKG_VERSION:=0.7 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)? @@ -45,6 +45,7 @@ TARGET_CFLAGS += $(FPIC) TARGET_LDFLAGS += $(FPIC) MAKE_FLAGS += \ + LD="$(TARGET_CC)" \ INCDIR="$(TARGET_CPPFLAGS) -I." \ LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ From aa2f0987d6a1a08c8a8e34c7f4eb075c2a027b06 Mon Sep 17 00:00:00 2001 From: Eneas U de Queiroz Date: Wed, 3 Apr 2019 17:58:56 -0300 Subject: [PATCH 2/2] luasec: cleanup Makefile The LIBDIR and INCDIR assignments are duplicate of the original Makefile, changing LIB_PATH and INC_PATH to LDFLAGS and CPPFLAGS. Setting LIB_PATH and INC_PATH to empty strings will do the same without duplicating the flags. Signed-off-by: Eneas U de Queiroz --- lang/luasec/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile index 79120bbc4..621cb7af6 100644 --- a/lang/luasec/Makefile +++ b/lang/luasec/Makefile @@ -46,8 +46,8 @@ TARGET_LDFLAGS += $(FPIC) MAKE_FLAGS += \ LD="$(TARGET_CC)" \ - INCDIR="$(TARGET_CPPFLAGS) -I." \ - LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ + INC_PATH="" \ + LIB_PATH="" \ LUACPATH="$(PKG_INSTALL_DIR)/usr/lib/lua" \ LUAPATH="$(PKG_INSTALL_DIR)/usr/lib/lua"