summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Scogland <scogland1@llnl.gov>2022-06-04 05:44:45 -0700
committerGitHub <noreply@github.com>2022-06-04 14:44:45 +0200
commit03c54aebdd914ada16925db7ca455132c45b8a45 (patch)
tree6d4df4656f1f23222bc6cbab1491829d295427ed
parentf4a4b3fa8781f4c5e66e652919b1c70531f121e1 (diff)
downloadspack-03c54aebdd914ada16925db7ca455132c45b8a45.tar.gz
spack-03c54aebdd914ada16925db7ca455132c45b8a45.tar.bz2
spack-03c54aebdd914ada16925db7ca455132c45b8a45.tar.xz
spack-03c54aebdd914ada16925db7ca455132c45b8a45.zip
luajit: use GC64 on darwin (#30971)
-rw-r--r--var/spack/repos/builtin/packages/lua-luajit-openresty/package.py6
-rw-r--r--var/spack/repos/builtin/packages/lua-luajit/package.py2
2 files changed, 8 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
index c0ac67953d..885656c174 100644
--- a/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
+++ b/var/spack/repos/builtin/packages/lua-luajit-openresty/package.py
@@ -43,6 +43,12 @@ class LuaLuajitOpenresty(LuaImplPackage):
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
diff --git a/var/spack/repos/builtin/packages/lua-luajit/package.py b/var/spack/repos/builtin/packages/lua-luajit/package.py
index 6054115b5d..e1e15616d5 100644
--- a/var/spack/repos/builtin/packages/lua-luajit/package.py
+++ b/var/spack/repos/builtin/packages/lua-luajit/package.py
@@ -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 @@ class LuaLuajit(LuaImplPackage):
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