luajit: disable unwind external on aarch64-darwin
see: https://github.com/LuaJIT/LuaJIT/issues/698
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 2538503f..7e6380da 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -320,7 +320,9 @@ ifeq (Darwin,$(TARGET_SYS))
|
||||
$(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY)
|
||||
endif
|
||||
TARGET_STRIP+= -x
|
||||
+ ifneq (arm64,$(shell uname -m))
|
||||
TARGET_XCFLAGS+= -DLUAJIT_UNWIND_EXTERNAL
|
||||
+ endif
|
||||
TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC
|
||||
TARGET_DYNXLDOPTS=
|
||||
TARGET_XSHLDFLAGS+= -install_name $(TARGET_DYLIBPATH) -compatibility_version $(MAJVER).$(MINVER) -current_version $(MAJVER).$(MINVER).$(RELVER)
|
||||
@@ -51,6 +51,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
luaversion = "5.1";
|
||||
|
||||
# Fix for pcall on aarch64-darwin.
|
||||
# Upstream issue: https://github.com/LuaJIT/LuaJIT/issues/698
|
||||
patches = lib.optionals (stdenv.hostPlatform.system == "aarch64-darwin") [ ./aarch64-darwin-disable-unwind-external.patch ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile --replace ldconfig :
|
||||
if test -n "''${dontStrip-}"; then
|
||||
|
||||
Reference in New Issue
Block a user