diff options
author | Rosen Penev <rosenp@gmail.com> | 2019-04-01 21:32:32 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2019-04-02 13:02:36 -0700 |
commit | cf23dd2eb0944a9a64ecec37344d04bc0c66eb4e (patch) | |
tree | 3ed65d4249b02d9e2cc21265adc3549917ccdb83 /lang/luasec | |
parent | 99e9755459d0edd6bb7efaf54a7cdce0bd6649bb (diff) |
luasec: Replace -fPIC with $(FPIC)
Currently i386 and the PPC targets have issues linking issues.
https://github.com/openwrt/packages/issues/3319
says that replacing -fPIC with -fpic works.
Patch added to avoid package overriding settings set by toolchain and make
compilation less noisy
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'lang/luasec')
-rw-r--r-- | lang/luasec/Makefile | 5 | ||||
-rw-r--r-- | lang/luasec/patches/100-fix-compilation.patch | 13 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lang/luasec/Makefile b/lang/luasec/Makefile index 4690ddd4b..29c120e1a 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:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/brunoos/luasec/tar.gz/luasec-$(PKG_VERSION)? @@ -41,6 +41,9 @@ endef define Build/Configure endef +TARGET_CFLAGS += $(FPIC) +TARGET_LDFLAGS += $(FPIC) + MAKE_FLAGS += \ INCDIR="$(TARGET_CPPFLAGS) -I." \ LIBDIR="$(TARGET_LDFLAGS) -L./luasocket" \ diff --git a/lang/luasec/patches/100-fix-compilation.patch b/lang/luasec/patches/100-fix-compilation.patch index fbd6ab3b6..61f0490a3 100644 --- a/lang/luasec/patches/100-fix-compilation.patch +++ b/lang/luasec/patches/100-fix-compilation.patch @@ -1,7 +1,16 @@ -diff --git a/src/Makefile b/src/Makefile -index 9be2f14..93d1dc4 100644 --- a/src/Makefile +++ b/src/Makefile +@@ -15,8 +15,8 @@ WARN=-Wall -pedantic + BSD_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) + BSD_LDFLAGS=-O -fPIC -shared $(LIBDIR) + +-LNX_CFLAGS=-O2 -fPIC $(WARN) $(INCDIR) $(DEFS) +-LNX_LDFLAGS=-O -fPIC -shared $(LIBDIR) ++LNX_CFLAGS=$(INCDIR) $(DEFS) ++LNX_LDFLAGS=-shared $(LIBDIR) + + MAC_ENV=env MACOSX_DEPLOYMENT_TARGET='$(MACVER)' + MAC_CFLAGS=-O2 -fno-common $(WARN) $(INCDIR) $(DEFS) @@ -33,10 +33,10 @@ LDFLAGS += $(MYLDFLAGS) all: |