Received: by mail.netbsd.org (Postfix, from userid 605) id 5660084F2D; Thu, 25 Jan 2024 15:15:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 861FB84E71 for ; Thu, 25 Jan 2024 15:15:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id KmYGArPV4NKH for ; Thu, 25 Jan 2024 15:15:14 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id EAD0A84D4A for ; Thu, 25 Jan 2024 15:15:13 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D7309FA42; Thu, 25 Jan 2024 15:15:13 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_170619571373750" MIME-Version: 1.0 Date: Thu, 25 Jan 2024 15:15:13 +0000 From: "Dr. Thomas Orgis" Subject: CVS commit: pkgsrc/emulators/qemu To: pkgsrc-changes@NetBSD.org Reply-To: thor@netbsd.org X-Mailer: log_accum Message-Id: <20240125151513.D7309FA42@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_170619571373750 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: thor Date: Thu Jan 25 15:15:13 UTC 2024 Modified Files: pkgsrc/emulators/qemu: Makefile Added Files: pkgsrc/emulators/qemu/files: linux-user-test.h Log Message: emulators/qemu: deactivate user mode on too-old Linux This checks if MAP_FIXED_NOREPLACE is available in libc headers and only enables linux-user targets if there, avoiding inevitable build failure. This is relevant for CentOS 7.9, ubuntu 18. May be phased out in some years, I presume, or once the main qemu targets also stop working. To generate a diff of this commit: cvs rdiff -u -r1.332 -r1.333 pkgsrc/emulators/qemu/Makefile cvs rdiff -u -r0 -r1.1 pkgsrc/emulators/qemu/files/linux-user-test.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_170619571373750 Content-Disposition: inline Content-Length: 1479 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/emulators/qemu/Makefile diff -u pkgsrc/emulators/qemu/Makefile:1.332 pkgsrc/emulators/qemu/Makefile:1.333 --- pkgsrc/emulators/qemu/Makefile:1.332 Thu Dec 28 17:15:39 2023 +++ pkgsrc/emulators/qemu/Makefile Thu Jan 25 15:15:13 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.332 2023/12/28 17:15:39 adam Exp $ +# $NetBSD: Makefile,v 1.333 2024/01/25 15:15:13 thor Exp $ DISTNAME= qemu-8.2.0 CATEGORIES= emulators @@ -132,7 +132,14 @@ USER_EMUL= CONFIGURE_ARGS+= --disable-bsd-user PLIST.nbd= yes .elif ${OPSYS} == "Linux" +# Help this package to build on systems too old for user-mode code. +HAVE_LINUX_USER!= ${CPP} ${CPPFLAGS} ${FILESDIR}/linux-user-test.h \ + >/dev/null 2>&1 && echo yes || echo no +. if ${HAVE_LINUX_USER} != "yes" +CONFIGURE_ARGS+= --disable-linux-user +. else USER_EMUL= ${UE_ARCHS} +. endif PLIST.bridge-helper= yes PLIST.ga= yes PLIST.nbd= yes Added files: Index: pkgsrc/emulators/qemu/files/linux-user-test.h diff -u /dev/null pkgsrc/emulators/qemu/files/linux-user-test.h:1.1 --- /dev/null Thu Jan 25 15:15:13 2024 +++ pkgsrc/emulators/qemu/files/linux-user-test.h Thu Jan 25 15:15:13 2024 @@ -0,0 +1,7 @@ +/* Qemu 8+ needs MAP_FIXED_NOREPLACE for linux user-mode emulation. + They offically do not support systems that are too old (glibc + version), but we're trying to build the rest, anyway. */ +#include +#ifndef MAP_FIXED_NOREPLACE +#error "Your libc is too old." +#endif --_----------=_170619571373750--