From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 06BE813835A for ; Mon, 12 Apr 2021 19:39:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 05C32E09D8; Mon, 12 Apr 2021 19:39:48 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E618AE09D8 for ; Mon, 12 Apr 2021 19:39:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0B452340E79 for ; Mon, 12 Apr 2021 19:39:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 88EA964A for ; Mon, 12 Apr 2021 19:39:45 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1618256373.957314a3054fd202618a5a44c076cbcda8c711d5.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/qemu/files/, app-emulation/qemu/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch app-emulation/qemu/qemu-5.2.0-r50.ebuild app-emulation/qemu/qemu-9999.ebuild X-VCS-Directories: app-emulation/qemu/files/ app-emulation/qemu/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 957314a3054fd202618a5a44c076cbcda8c711d5 X-VCS-Branch: master Date: Mon, 12 Apr 2021 19:39:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f5bce9f7-f59e-4b04-85d9-cccd5b1d3e6d X-Archives-Hash: ec6a602dc621612b69daf66a572a8fa5 commit: 957314a3054fd202618a5a44c076cbcda8c711d5 Author: Sergei Trofimovich gentoo org> AuthorDate: Mon Apr 12 19:37:55 2021 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Mon Apr 12 19:39:33 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=957314a3 app-emulation/qemu: Do not rely on DCE for lock type test Fix CFLAGS=-Og build break. -Og fails because gcc does not enable dead code elimination (but does set __OPTIMIZE__ define). The fix avoids DCE reliance downstream entirely. Reported-by: Luke-Jr Closes: https://bugs.gentoo.org/782364 Package-Manager: Portage-3.0.18, Repoman-3.0.3 Signed-off-by: Sergei Trofimovich gentoo.org> app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch | 18 ++++++++++++++++++ app-emulation/qemu/qemu-5.2.0-r50.ebuild | 1 + app-emulation/qemu/qemu-9999.ebuild | 1 + 3 files changed, 20 insertions(+) diff --git a/app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch b/app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch new file mode 100644 index 00000000000..679a9f391b0 --- /dev/null +++ b/app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch @@ -0,0 +1,18 @@ +Fix CFLAGS=-Og build break. -Og fails because gcc does not enable dead +code elimination (but does set __OPTIMIZE__ define). + +The fix avoids DCE reliance downstream entirely. + +Reported-by: Luke-Jr +Bug: https://bugs.gentoo.org/782364 +--- a/include/qemu/lockable.h ++++ b/include/qemu/lockable.h +@@ -28,7 +28,7 @@ struct QemuLockable { + * to QEMU_MAKE_LOCKABLE. For optimized builds, we can rely on dead-code elimination + * from the compiler, and give the errors already at link time. + */ +-#if defined(__OPTIMIZE__) && !defined(__SANITIZE_ADDRESS__) ++#if defined(__OPTIMIZE__) && !defined(__SANITIZE_ADDRESS__) && defined(VALIDATE_LOCKS_VIA_DCE) + void unknown_lock_type(void *); + #else + static inline void unknown_lock_type(void *unused) diff --git a/app-emulation/qemu/qemu-5.2.0-r50.ebuild b/app-emulation/qemu/qemu-5.2.0-r50.ebuild index 6b9bfbec8c9..7a9f08f8539 100644 --- a/app-emulation/qemu/qemu-5.2.0-r50.ebuild +++ b/app-emulation/qemu/qemu-5.2.0-r50.ebuild @@ -234,6 +234,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.2.0-strings.patch "${FILESDIR}"/${PN}-5.2.0-fix-firmware-path.patch "${FILESDIR}"/${PN}-5.2.0-no-pie-ld.patch + "${FILESDIR}"/${PN}-5.2.0-dce-locks.patch ) QA_PREBUILT=" diff --git a/app-emulation/qemu/qemu-9999.ebuild b/app-emulation/qemu/qemu-9999.ebuild index 9e8be4658ae..9970b1a031f 100644 --- a/app-emulation/qemu/qemu-9999.ebuild +++ b/app-emulation/qemu/qemu-9999.ebuild @@ -272,6 +272,7 @@ PATCHES=( "${FILESDIR}"/${PN}-5.2.0-strings.patch "${FILESDIR}"/${PN}-5.2.0-cleaner-werror.patch "${FILESDIR}"/${PN}-5.2.0-disable-keymap.patch + "${FILESDIR}"/${PN}-5.2.0-dce-locks.patch ) QA_PREBUILT="