From be157516d886c37674cdb3d26dd252689d048611 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Feb 01 2024 18:51:08 +0000 Subject: Replace pvh build fix with new attempt that builds on centos too Signed-off-by: Cole Robinson --- 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 index 87d8a11..b699c10 100644 --- 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 @@ -1,4 +1,4 @@ -From 98287d67f3ea6c49795838beda4b020cf236fc20 Mon Sep 17 00:00:00 2001 +From 12cbd48e1e78f07b19df900b0f9ccdd633aa42ee Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 27 Nov 2023 12:51:25 -0500 Subject: [PATCH] pc-bios/optionrom: Fix pvh.img ld build failure on fedora @@ -17,19 +17,36 @@ Add linker options to suppress the errors Signed-off-by: Cole Robinson --- - pc-bios/optionrom/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + pc-bios/optionrom/Makefile | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile -index 30d07026c7..f54ed39b54 100644 +index 30d07026c7..87cfc484c7 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 +@@ -38,6 +38,16 @@ config-cc.mak: Makefile --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 + override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds ++ld-test = $(LD) -v $1 >/dev/null 2>/dev/null ++ld-option = if $(call ld-test, $1); then \ ++ echo "$(TARGET_PREFIX)$1 detected" && echo "override LDFLAGS += -Wl,$1" >&3; else \ ++ echo "$(TARGET_PREFIX)$1 not detected" $(if $2,&& echo "override LDFLAGS += $2" >&3); fi ++ ++config-ld.mak: Makefile ++ $(quiet-@)($(call ld-option,--no-warn-rwx-segments); \ ++ $(call ld-option,--no-warn-execstack)) 3> config-ld.mak ++-include config-ld.mak ++ pvh.img: pvh.o pvh_main.o + %.o: %.S +@@ -61,7 +71,7 @@ clean: + rm -f *.o *.d *.raw *.img *.bin *~ + + distclean: +- rm -f config-cc.mak ++ rm -f config-cc.mak config-ld.mak + + # suppress auto-removal of intermediate files + .SECONDARY: diff --git a/qemu.spec b/qemu.spec index 18aa398..3f862fb 100644 --- a/qemu.spec +++ b/qemu.spec @@ -374,8 +374,9 @@ Source0: %{dlurl}/%{name}-%{version}%{?rcstr}.tar.xz Source1: %{dlurl}/%{name}-%{version}%{?rcstr}.tar.xz.sig Source2: gpgkey-CEACC9E15534EBABB82D3FA03353C9CEF108B584.gpg -# https://patchwork.kernel.org/project/qemu-devel/patch/20231128143647.847668-1-crobinso@redhat.com/ # Fix pvh.img ld build failure on fedora rawhide +# Not yet submitted upstream in this form. Original attempt is here: +# https://patchwork.kernel.org/project/qemu-devel/patch/20231128143647.847668-1-crobinso@redhat.com/ Patch: 0001-pc-bios-optionrom-Fix-pvh.img-ld-build-failure-on-fe.patch