From owner-svn-ports-all@freebsd.org Sun Dec 31 00:50:33 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AFF9EB6302; Sun, 31 Dec 2017 00:50:33 +0000 (UTC) (envelope-from dim@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 mx1.freebsd.org (Postfix) with ESMTPS id 54E4976816; Sun, 31 Dec 2017 00:50:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV0oW4P026771; Sun, 31 Dec 2017 00:50:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV0oWJJ026769; Sun, 31 Dec 2017 00:50:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201712310050.vBV0oWJJ026769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 31 Dec 2017 00:50:32 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457655 - in head/lang/luajit: . files X-SVN-Group: ports-head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lang/luajit: . files X-SVN-Commit-Revision: 457655 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 00:50:33 -0000 Author: dim (src committer) Date: Sun Dec 31 00:50:32 2017 New Revision: 457655 URL: https://svnweb.freebsd.org/changeset/ports/457655 Log: Fix lang/luajit object file .strtab section size When luajit writes a ELF object file (using the -b option), it sets the size of the .strtab section one byte too short. In function bcsave_elfobj(), the offset of the .rodata section after .strtab is already calculated correctly, but the size of .strtab itself is one byte too small. Even though there is a zero byte after the last string in the table, the short size causes lld (the LLVM linker) to show an error message similar to: ld: error: obj/bytecode.o: string table non-null terminated Fix it by increasing the size of the .strtab section by one byte. This change has also been accepted upstream, but there is no new stable release yet. Approved by: portmgr (antoine) PR: 223688 Added: head/lang/luajit/files/patch-src_jit_bcsave.lua (contents, props changed) Modified: head/lang/luajit/Makefile Modified: head/lang/luajit/Makefile ============================================================================== --- head/lang/luajit/Makefile Sun Dec 31 00:00:06 2017 (r457654) +++ head/lang/luajit/Makefile Sun Dec 31 00:50:32 2017 (r457655) @@ -3,6 +3,7 @@ PORTNAME= luajit DISTVERSION= 2.0.5 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= http://luajit.org/download/ DISTNAME= LuaJIT-${DISTVERSION} Added: head/lang/luajit/files/patch-src_jit_bcsave.lua ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/luajit/files/patch-src_jit_bcsave.lua Sun Dec 31 00:50:32 2017 (r457655) @@ -0,0 +1,11 @@ +--- src/jit/bcsave.lua.orig 2017-05-01 18:11:00 UTC ++++ src/jit/bcsave.lua +@@ -275,7 +275,7 @@ typedef struct { + o.sect[2].size = fofs(ofs) + o.sect[3].type = f32(3) -- .strtab + o.sect[3].ofs = fofs(sofs + ofs) +- o.sect[3].size = fofs(#symname+1) ++ o.sect[3].size = fofs(#symname+2) + ffi.copy(o.space+ofs+1, symname) + ofs = ofs + #symname + 2 + o.sect[4].type = f32(1) -- .rodata