diff --git a/doc/install.html b/doc/install.html index da350b9c..49d6e9ed 100644 --- a/doc/install.html +++ b/doc/install.html @@ -222,8 +222,8 @@ You can add an extra prefix to the search paths by appending the make PREFIX=/home/myself/lj2
-Note for OSX: if the MACOSX_DEPLOYMENT_TARGET environment -variable is not set, then it's forced to 10.4. +Note for OSX: you must set the MACOSX_DEPLOYMENT_TARGET +environment variable to a value supported by your toolchain.
diff --git a/src/Makefile b/src/Makefile index d22eb732..71c284e2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -158,7 +158,6 @@ XCFLAGS= ifeq (Windows,$(findstring Windows,$(OS))$(MSYSTEM)$(TERM)) HOST_SYS= Windows - HOST_RM= del else HOST_SYS:= $(shell uname -s) ifneq (,$(findstring MINGW,$(HOST_SYS))) @@ -221,6 +220,7 @@ TARGET_SONAME= libluajit-$(ABIVER).so.$(MAJVER) TARGET_DYLIBNAME= libluajit-$(ABIVER).$(MAJVER).dylib TARGET_DYLIBPATH= $(TARGET_LIBPATH)/$(TARGET_DYLIBNAME) TARGET_DLLNAME= lua$(NODOTABIVER).dll +TARGET_DLLDOTANAME= libluajit-$(ABIVER).dll.a TARGET_XSHLDFLAGS= -shared -fPIC -Wl,-soname,$(TARGET_SONAME) TARGET_DYNXLDOPTS= @@ -309,8 +309,9 @@ endif TARGET_SYS?= $(HOST_SYS) ifeq (Windows,$(TARGET_SYS)) TARGET_STRIP+= --strip-unneeded - TARGET_XSHLDFLAGS= -shared + TARGET_XSHLDFLAGS= -shared -Wl,--out-implib,$(TARGET_DLLDOTANAME) TARGET_DYNXLDOPTS= + HOST_RM= del else TARGET_AR+= 2>/dev/null ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector 2>/dev/null || echo 1)) @@ -318,7 +319,7 @@ ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-stack-protector endif ifeq (Darwin,$(TARGET_SYS)) ifeq (,$(MACOSX_DEPLOYMENT_TARGET)) - export MACOSX_DEPLOYMENT_TARGET=10.4 + $(error missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY) endif TARGET_STRIP+= -x TARGET_XSHLDFLAGS= -dynamiclib -single_module -undefined dynamic_lookup -fPIC diff --git a/src/lj_err.c b/src/lj_err.c index abf176e5..83118551 100644 --- a/src/lj_err.c +++ b/src/lj_err.c @@ -287,12 +287,7 @@ LJ_FUNCA int lj_err_unwind_dwarf(int version, int actions, } #if LJ_UNWIND_EXT -#if LJ_TARGET_OSX || defined(__OpenBSD__) -/* Sorry, no thread safety for OSX. Complain to Apple, not me. */ -static _Unwind_Exception static_uex; -#else static __thread _Unwind_Exception static_uex; -#endif /* Raise DWARF2 exception. */ static void err_raise_ext(int errcode)