From owner-svn-ports-branches@freebsd.org Thu Oct 29 23:53:37 2020 Return-Path: Delivered-To: svn-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14171441C39; Thu, 29 Oct 2020 23:53:37 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CMj286tF0z4W8k; Thu, 29 Oct 2020 23:53:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D00AFDD32; Thu, 29 Oct 2020 23:53:36 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09TNra4s038730; Thu, 29 Oct 2020 23:53:36 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TNra1G038729; Thu, 29 Oct 2020 23:53:36 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202010292353.09TNra1G038729@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 29 Oct 2020 23:53:36 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r553657 - in branches/2020Q4/lang/luajit: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in branches/2020Q4/lang/luajit: . files X-SVN-Commit-Revision: 553657 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 23:53:37 -0000 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 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: