diff options
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=" |