On Tue, Oct 26, 2021 at 10:04:42PM +0200, Christian Weisgerber wrote: > lang/python/3.8 fails to build with llvm13. The reason appears to be > some silly confusion between "openbsd7" and "openbsd7.0" in the build > system:
> The trigger appears to be the new support for "cc --print-multiarch": > llvm 12 says on stderr: > cc: error: unsupported option '--print-multiarch' > cc: error: no input files > llvm 13 says on stdout: > amd64-unknown-openbsd7.0 > I haven't managed to trace this any further. This patch to configure.ac should neutralize the MULTIARCH stuff which isn't applicable to OpenBSD anyway. It builds properly on my laptop which is still using LLVM 11.1. I'll try building LLVM 13 tonight and see if it works with that, but someone else is welcome to try this patch before I get to it. --Kurt Index: patches/patch-configure_ac =================================================================== RCS file: /cvs/ports/lang/python/3.8/patches/patch-configure_ac,v retrieving revision 1.3 diff -u -p -r1.3 patch-configure_ac --- patches/patch-configure_ac 12 Jun 2021 04:03:23 -0000 1.3 +++ patches/patch-configure_ac 26 Oct 2021 22:11:24 -0000 @@ -2,6 +2,7 @@ $OpenBSD: patch-configure_ac,v 1.3 2021/ #1: Set ports library version #2: Don't pick up an installed linux/e2fsprogs libuuid.so +#3: OpenBSD isn't multi-arch Index: configure.ac --- configure.ac.orig @@ -15,6 +16,26 @@ Index: configure.ac # The later defininition of _XOPEN_SOURCE disables certain features # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone). +@@ -719,7 +719,7 @@ then + fi + + +-MULTIARCH=$($CC --print-multiarch 2>/dev/null) ++MULTIARCH=$(false) + AC_SUBST(MULTIARCH) + + AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) +@@ -735,8 +735,8 @@ cat >> conftest.c <<EOF + #undef powerpc + #undef sparc + #undef unix +-#if defined(__ANDROID__) +- # Android is not a multiarch system. ++#if defined(__ANDROID__) || defined (__OpenBSD__) ++ # Neither Android nor OpenBSD are multiarch systems. + #elif defined(__linux__) + # if defined(__x86_64__) && defined(__LP64__) + x86_64-linux-gnu @@ -2811,18 +2811,7 @@ AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/S AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX