On Sat, 3 Jul 2021 16:48:21 +0000 Charlene Wendling <juliana...@posteo.jp> wrote:
> Hi, > > On Sat, 3 Jul 2021 15:21:55 +0100 > Stuart Henderson <s...@spacehopper.org> wrote: > > > > I've built all dependent ports on amd64 with no problems, and done > > runtime tests of rspamd and luakit so far. I'll do some tests with > > i386 too. Does anyone want to do other tests? (The powerpc-related > > patch removed in the diff was committed upstream; I have not tested > > it on ppc though). > > It builds fine on powerpc with your diff and ports-gcc, but actually > base-clang can be used instead. > > I've updated your diff with the required bits. It appears that luajit > "wants" gcc>=4.3 to build on powerpc, but our base-clang poses as > 4.2.1. Other arches are not impacted by the issue because the gcc > version requirement is lower. I've disabled gcc version checking for > all base-clang arches. > > It builds [0] and works fine with hexchat. By the way, luajit is not > enabled in rspamd for powerpc as well. > > Charlène. > (sigh, forgot the log) [0] https://bin.charlenew.xyz/luajit_macppc_clang.log Index: Makefile =================================================================== RCS file: /cvs/ports/lang/luajit/Makefile,v retrieving revision 1.31 diff -u -p -u -p -r1.31 Makefile --- Makefile 10 Aug 2020 00:56:40 -0000 1.31 +++ Makefile 3 Jul 2021 16:40:02 -0000 @@ -1,38 +1,38 @@ # $OpenBSD: Makefile,v 1.31 2020/08/10 00:56:40 jca Exp $ -# ../src/luajit2/src/lj_arch.h:55:2: error: #error "No support for -# this architecture (yet)" -ONLY_FOR_ARCHS = powerpc i386 amd64 -# arm needs missing EABI symbols +ONLY_FOR_ARCHS = arm amd64 i386 powerpc +# if changing the above and it actually builds, switch to using +# luajit in mail/rspamd +# - arm added speculatively, so not added in rspamd yet. +# +# no aarch64 support in luajit 2.0 branch # games/tome4 is using embedded copy of luajit -# if changing, sync in mail/rspamd SHARED_LIBS += luajit-${MODLUA_VERSION} 1.0 # 2.0.5 +# "Releases are only made occasionally. You're strongly encouraged to follow +# the git branches" +GH_ACCOUNT = LuaJIT +GH_PROJECT = LuaJIT +GH_COMMIT = 98f95f69180d48ce49289d6428b46a9ccdd67a46 + COMMENT = just-in-time compiler for Lua V = 2.0.5 -REVISION = 2 -DISTNAME = LuaJIT-${V} +DISTNAME = LuaJIT-${V}pl20210608 PKGNAME = ${DISTNAME:L} CATEGORIES = lang -HOMEPAGE = http://luajit.org/ +HOMEPAGE = https://luajit.org/ # MIT PERMIT_PACKAGE = Yes WANTLIB = c m -MASTER_SITES = ${HOMEPAGE}download/ - MODULES = lang/lua MODLUA_SA= Yes MODLUA_VERSION= 5.1 - -MODULES += gcc4 -MODGCC4_ARCHS = powerpc -MODGCC4_LANGS = c MAKE_FLAGS += \ CC="${CC}" \ Index: distinfo =================================================================== RCS file: /cvs/ports/lang/luajit/distinfo,v retrieving revision 1.8 diff -u -p -u -p -r1.8 distinfo --- distinfo 5 May 2017 10:21:47 -0000 1.8 +++ distinfo 3 Jul 2021 16:40:02 -0000 @@ -1,2 +1,2 @@ -SHA256 (LuaJIT-2.0.5.tar.gz) = h0sfgpfGl4IfVh+bc7V//UGe2PQnjILgW0iAbTDB6Xk= -SIZE (LuaJIT-2.0.5.tar.gz) = 849845 +SHA256 (LuaJIT-2.0.5pl20210608-98f95f69.tar.gz) = wmjMMUjuUzRqfRu4plfFqD7otJefP7Wwj67uj4mDfdQ= +SIZE (LuaJIT-2.0.5pl20210608-98f95f69.tar.gz) = 844346 Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/lang/luajit/patches/patch-Makefile,v retrieving revision 1.6 diff -u -p -u -p -r1.6 patch-Makefile --- patches/patch-Makefile 5 May 2017 10:21:47 -0000 1.6 +++ patches/patch-Makefile 3 Jul 2021 16:40:02 -0000 @@ -1,6 +1,8 @@ $OpenBSD: patch-Makefile,v 1.6 2017/05/05 10:21:47 jsg Exp $ ---- Makefile.orig Tue May 2 04:11:00 2017 -+++ Makefile Tue May 2 11:40:27 2017 + +Index: Makefile +--- Makefile.orig ++++ Makefile @@ -17,7 +17,7 @@ MAJVER= 2 MINVER= 0 RELVER= 5 @@ -15,7 +17,7 @@ $OpenBSD: patch-Makefile,v 1.6 2017/05/0 $(RM) $(INSTALL_TSYM) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) cd src && test -f $(FILE_SO) && \ - $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) && \ -- $(LDCONFIG) $(INSTALL_LIB) && \ +- ( $(LDCONFIG) $(INSTALL_LIB) || : ) && \ - $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT1) && \ - $(SYMLINK) $(INSTALL_SONAME) $(INSTALL_SHORT2) || : + $(INSTALL_X) $(FILE_SO) $(INSTALL_DYN) || : Index: patches/patch-src_Makefile =================================================================== RCS file: /cvs/ports/lang/luajit/patches/patch-src_Makefile,v retrieving revision 1.6 diff -u -p -u -p -r1.6 patch-src_Makefile --- patches/patch-src_Makefile 5 May 2017 10:21:47 -0000 1.6 +++ patches/patch-src_Makefile 3 Jul 2021 16:40:02 -0000 @@ -1,7 +1,9 @@ $OpenBSD: patch-src_Makefile,v 1.6 2017/05/05 10:21:47 jsg Exp $ ---- src/Makefile.orig Tue May 2 04:11:00 2017 -+++ src/Makefile Tue May 2 11:40:27 2017 -@@ -326,6 +326,10 @@ else + +Index: src/Makefile +--- src/Makefile.orig ++++ src/Makefile +@@ -331,6 +331,10 @@ else ifeq (GNU/kFreeBSD,$(TARGET_SYS)) TARGET_XLIBS+= -ldl endif @@ -12,7 +14,7 @@ $OpenBSD: patch-src_Makefile,v 1.6 2017/ endif endif endif -@@ -562,10 +566,10 @@ endif +@@ -568,10 +572,10 @@ endif endif endif Index: patches/patch-src_jit_bcsave_lua =================================================================== RCS file: patches/patch-src_jit_bcsave_lua diff -N patches/patch-src_jit_bcsave_lua --- patches/patch-src_jit_bcsave_lua 22 Oct 2018 19:16:25 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_jit_bcsave_lua,v 1.1 2018/10/22 19:16:25 kettenis Exp $ - -Index: src/jit/bcsave.lua ---- src/jit/bcsave.lua.orig -+++ 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 Index: patches/patch-src_lj_arch_h =================================================================== RCS file: /cvs/ports/lang/luajit/patches/patch-src_lj_arch_h,v retrieving revision 1.5 diff -u -p -u -p -r1.5 patch-src_lj_arch_h --- patches/patch-src_lj_arch_h 5 May 2017 10:21:47 -0000 1.5 +++ patches/patch-src_lj_arch_h 3 Jul 2021 16:40:02 -0000 @@ -1,13 +1,18 @@ $OpenBSD: patch-src_lj_arch_h,v 1.5 2017/05/05 10:21:47 jsg Exp $ ---- src/lj_arch.h.orig Tue May 2 04:11:00 2017 -+++ src/lj_arch.h Tue May 2 11:40:27 2017 -@@ -339,9 +339,6 @@ - #if defined(_SOFT_FLOAT) || defined(_SOFT_DOUBLE) - #error "No support for PowerPC CPUs without double-precision FPU" - #endif --#if defined(_LITTLE_ENDIAN) --#error "No support for little-endian PowerPC" --#endif - #if defined(_LP64) - #error "No support for PowerPC 64 bit mode" + +Our base-clang poses as gcc-4.2.1, but building with clang on powerpc +"requires" gcc>=4.3, unlike other archs requiring lower versions. Instead, +ignore the gcc version check ifdef hell for all base-clang arches. + +Index: src/lj_arch.h +--- src/lj_arch.h.orig ++++ src/lj_arch.h +@@ -299,7 +299,7 @@ #endif + + /* Check for minimum required compiler versions. */ +-#if defined(__GNUC__) ++#if defined(__GNUC__) && !defined(__clang__) + #if LJ_TARGET_X86 + #if (__GNUC__ < 3) || ((__GNUC__ == 3) && __GNUC_MINOR__ < 4) + #error "Need at least GCC 3.4 or newer"