svn commit: r553657 - in branches/2020Q4/lang/luajit: . files
Kyle Evans
kevans at FreeBSD.org
Thu Oct 29 23:53:37 UTC 2020
Author: kevans
Date: Thu Oct 29 23:53:36 2020
New Revision: 553657
URL: https://svnweb.freebsd.org/changeset/ports/553657
Log:
MFH: r553656
lang/luajit: switch to LLVM10 from ports for 12.1/amd64
12.1 shipped with LLVM 8.0.1 which links libluajit with a bogus (improperly
aligned) TLS segment offset. Notably, this breaks under 12.2 rtld and causes
a SIGBUS when an error is raised.
Since the issue is technically a broken binary, the attached patch pins
12.1/amd64 builds of luajit to devel/llvm10 so that they can be rebuilt with
a linker that will handle this properly and stop breaking luajit-dependant
applications on 12.2 while the packages are still built on 12.1. This will
naturally fall away when portmgr goes to axe conditionals solely for FreeBSD
12.1 after it goes EOL.
The src/Makefile patch has been dropped in this version in favor of just
supplying the variables it was unsetting via Make arguments as a minor
cleanup.
PR: 250707, 250726
Reported by: many
Investigation by: Andrew Gierth <andrew tao11 riddles org uk>
Confirmation from: kib
Approved by: osa (maintainer)
Approved by: ports-secteam (implicit, runtime fix)
Deleted:
branches/2020Q4/lang/luajit/files/patch-src_Makefile
Modified:
branches/2020Q4/lang/luajit/Makefile
Directory Properties:
branches/2020Q4/ (props changed)
Modified: branches/2020Q4/lang/luajit/Makefile
==============================================================================
--- branches/2020Q4/lang/luajit/Makefile Thu Oct 29 23:53:01 2020 (r553656)
+++ branches/2020Q4/lang/luajit/Makefile Thu Oct 29 23:53:36 2020 (r553657)
@@ -3,7 +3,7 @@
PORTNAME= luajit
DISTVERSION= 2.0.5
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= lang
MASTER_SITES= https://luajit.org/download/
DISTNAME= LuaJIT-${DISTVERSION}
@@ -23,7 +23,7 @@ CONFLICTS_INSTALL= luajit-openresty
WRKSRC= ${WRKDIR}/LuaJIT-${DISTVERSION}
USES= gmake
USE_LDCONFIG= yes
-MAKE_ARGS= CC=${CC}
+MAKE_ARGS= CC=${CC} CCOPT= CCOPT_x86=
PLIST_SUB+= VERSION=${DISTVERSION}
@@ -31,6 +31,19 @@ PLIST_SUB+= VERSION=${DISTVERSION}
.if ${ARCH:Mpowerpc*} || ${ARCH:Mmips*} || ${ARCH:Msparc*}
USE_GCC=yes
+.elif ${ARCH} == amd64
+# FreeBSD 12.1 shipped LLVM 8.0.1, which links libluajit with a TLS phdr that
+# requests a 16-byte alignment but an offset that's 8 mod 16. This results in
+# hilarity when an error is raised, as luajit raises an exception (stored in a
+# static TLS variable) via libunwind. libunwind assumes proper alignment of
+# the exception and uses a movaps instruction, which throws a SIGBUS when it
+# encounters this misaligned TLS data. While the linker problem doesn't seem
+# to be specific to amd64, the effect on luajit does seem to be.
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1201000 && ${OSVERSION} < 1202000
+LLVM_MINIMUM= 10
+BUILD_DEPENDS+= llvm${LLVM_MINIMUM}>=10.0:devel/llvm${LLVM_MINIMUM}
+CC= clang10
+.endif
.endif
post-install:
More information about the svn-ports-all
mailing list