diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-04-12 20:37:55 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2021-04-12 20:39:33 +0100 |
commit | 957314a3054fd202618a5a44c076cbcda8c711d5 (patch) | |
tree | eed833a4c0f74f0c77fcf19c880470647b6b9a64 /app-emulation | |
parent | app-emulation/qemu: mark USE=virtfs as non-tools flag (diff) | |
download | gentoo-957314a3054fd202618a5a44c076cbcda8c711d5.tar.gz gentoo-957314a3054fd202618a5a44c076cbcda8c711d5.tar.bz2 gentoo-957314a3054fd202618a5a44c076cbcda8c711d5.zip |
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 <slyfox@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/qemu/files/qemu-5.2.0-dce-locks.patch | 18 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-5.2.0-r50.ebuild | 1 | ||||
-rw-r--r-- | app-emulation/qemu/qemu-9999.ebuild | 1 |
3 files changed, 20 insertions, 0 deletions
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 000000000000..679a9f391b0b --- /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 6b9bfbec8c97..7a9f08f85398 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 9e8be4658aef..9970b1a031f7 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=" |