luajit: use GC64 on darwin (#30971)

This commit is contained in:
Tom Scogland 2022-06-04 05:44:45 -07:00 committed by GitHub
parent f4a4b3fa87
commit 03c54aebdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,12 @@ def edit(self, spec, prefix):
src_makefile.filter(
'^DYNAMIC_CC = .*',
'DYNAMIC_CC = $(CC) {0}'.format(self.compiler.cc_pic_flag))
# Catalina and higher produce a non-functional luajit unless this is set
if spec.satisfies("platform=darwin"):
src_makefile.filter(
'^.XCFLAGS.= -DLUAJIT_ENABLE_GC64',
'XCFLAGS+= -DLUAJIT_ENABLE_GC64',
)
# Linking with the C++ compiler is a dirty hack to deal with the fact
# that unwinding symbols are not included by libc, this is necessary
# on some platforms for the final link stage to work

View File

@ -26,6 +26,7 @@ class LuaLuajit(LuaImplPackage):
conflicts("lua", when="+lualinks")
provides("luajit")
lua_version_override = "5.1"
conflicts('platform=darwin', msg='luajit not supported on MacOS, see lua-luajit-openresty')
@run_after("install")
def install_links(self):
@ -47,6 +48,7 @@ def edit(self, spec, prefix):
src_makefile.filter(
'^DYNAMIC_CC = .*',
'DYNAMIC_CC = $(CC) {0}'.format(self.compiler.cc_pic_flag))
# Linking with the C++ compiler is a dirty hack to deal with the fact
# that unwinding symbols are not included by libc, this is necessary
# on some platforms for the final link stage to work