luasec: use gcc to link instead of ld
authorEneas U de Queiroz <redacted>
Wed, 3 Apr 2019 17:43:10 +0000 (14:43 -0300)
committerEneas U de Queiroz <redacted>
Wed, 3 Apr 2019 18:10:10 +0000 (15:10 -0300)
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 <redacted>
lang/luasec/Makefile

index 29c120e1ae90a85eff27d4f995832b98d2aa9dfa..79120bbc42f9e7da61f7ee37aa27e1a3d785e20d 100644 (file)
@@ -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" \
git clone https://git.99rst.org/PROJECT