diff options
Diffstat (limited to 'core/src/luajit')
| -rw-r--r-- | core/src/luajit/makefile | 8 | ||||
| -rw-r--r-- | core/src/luajit/xmake.lua | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/core/src/luajit/makefile b/core/src/luajit/makefile index 4af63a873..0bfbaa0ff 100644 --- a/core/src/luajit/makefile +++ b/core/src/luajit/makefile @@ -125,7 +125,13 @@ luajit_CXFLAGS += -Wno-error=unused-function ifeq ($(BUILD_ARCH),arm) luajit_CXFLAGS += -DLUAJIT_USE_SYSMALLOC endif - + +# fix call math.sin/log crash for fedora/i386/lj_vm.S with `LDFLAGS = -specs=/usr/lib/rpm/redhat/redhat-hardened-ld` in xmake.spec/%set_build_flags +ifeq ($(BUILD_ARCH),i386) +luajit_ASFLAGS += -fPIC +luajit_CXFLAGS += -fPIC +endif + # suffix include $(PRO_DIR)/suffix.mak diff --git a/core/src/luajit/xmake.lua b/core/src/luajit/xmake.lua index 2ab1ae5dd..2479be3ce 100644 --- a/core/src/luajit/xmake.lua +++ b/core/src/luajit/xmake.lua @@ -60,6 +60,12 @@ target("luajit") add_defines("LUAJIT_USE_SYSMALLOC") end + -- fix call math.sin/log crash for fedora/i386/lj_vm.S with `LDFLAGS = -specs=/usr/lib/rpm/redhat/redhat-hardened-ld` in xmake.spec/%set_build_flags + if is_plat("linux") and is_arch("i386") then + add_asflags("-fPIC") + add_ldflags("-fPIC") + end + -- enable lua5.2 compat, @see http://luajit.org/extensions.html --[[ add_defines("LUAJIT_ENABLE_LUA52COMPAT") |
