From e5cb9532c0bd90554081b3ccad5b9cc26592112c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Nov 29 2023 01:29:24 +0000 Subject: Backport patch from crobinso to fix build on Rawhide --- diff --git a/0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch b/0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch new file mode 100644 index 0000000..1cb8691 --- /dev/null +++ b/0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch @@ -0,0 +1,37 @@ +From 9a9ff4c9129de5d65a0e7cbba45a8ad89ddc51cd Mon Sep 17 00:00:00 2001 +From: Cole Robinson +Date: Tue, 28 Nov 2023 09:36:47 -0500 +Subject: [PATCH] pc-bios/optionrom: Fix pvh.img ld build failure on fedora + rawhide + +binutils 2.39 shows some warnings when building pvh.img + +/usr/bin/ld: warning: pvh.o: missing .note.GNU-stack section implies executable stack +/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker +/usr/bin/ld: warning: pvh.img has a LOAD segment with RWX permissions + +The latter of which is fatal on Fedora rawhide for some reason. + +Add linker options to suppress the errors + +Signed-off-by: Cole Robinson +--- + pc-bios/optionrom/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile +index 30d07026c7..f54ed39b54 100644 +--- a/pc-bios/optionrom/Makefile ++++ b/pc-bios/optionrom/Makefile +@@ -36,7 +36,7 @@ config-cc.mak: Makefile + $(call cc-option,-Wno-array-bounds)) 3> config-cc.mak + -include config-cc.mak + +-override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds ++override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds -Wl,--no-warn-rwx-segments -Wl,--no-warn-execstack + + pvh.img: pvh.o pvh_main.o + +-- +2.43.0 + diff --git a/qemu.spec b/qemu.spec index 700375e..849a049 100644 --- a/qemu.spec +++ b/qemu.spec @@ -349,6 +349,10 @@ URL: http://www.qemu.org/ Source0: https://download.qemu.org/%{name}-%{version}%{?rcstr}.tar.xz +# https://patchwork.kernel.org/project/qemu-devel/patch/20231128143647.847668-1-crobinso@redhat.com/ +# Fix pvh.img ld build failure on fedora rawhide +Patch: 0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch + Source10: qemu-guest-agent.service Source11: 99-qemu-guest-agent.rules Source12: bridge.conf @@ -3040,6 +3044,7 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog * Tue Nov 28 2023 Richard W.M. Jones - 2:8.1.2-2 - Bump and rebuild for capstone 5.0.1 +- Backport patch from crobinso to fix build on Rawhide * Tue Oct 17 2023 Cole Robinson - 8.1.2-1 - Update to version 8.1.2