From e152a2873798f09c0ed36d0de4a0958b46b02c5e Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Wed, 26 Oct 2022 22:22:19 +0200 Subject: [PATCH] Toolchain: Update BuildQemu.sh to qemu-7.1 QEMU 7.1 was released on August 30th. Release Notes: https://wiki.qemu.org/ChangeLog/7.1 The patch 'Toolchain/Patches/qemu-cf-protection-none.patch' (or similar) has been upstreamed so it can be safely removed. --- Toolchain/BuildQemu.sh | 9 +---- .../Patches/qemu-cf-protection-none.patch | 37 ------------------- 2 files changed, 2 insertions(+), 44 deletions(-) delete mode 100644 Toolchain/Patches/qemu-cf-protection-none.patch diff --git a/Toolchain/BuildQemu.sh b/Toolchain/BuildQemu.sh index 2d206be7df..025ea87d54 100755 --- a/Toolchain/BuildQemu.sh +++ b/Toolchain/BuildQemu.sh @@ -11,8 +11,8 @@ PREFIX="$DIR/Local/qemu" BUILD=$(realpath "$DIR/../Build") SYSROOT="$BUILD/Root" -QEMU_VERSION=${QEMU_VERSION:="qemu-7.0.0"} -QEMU_MD5SUM=${QEMU_MD5SUM:="bfb5b09a0d1f887c8c42a6d5f26971ab"} +QEMU_VERSION=${QEMU_VERSION:="qemu-7.1.0"} +QEMU_MD5SUM=${QEMU_MD5SUM:="3be5458a9171b4ec5220c65d5d52bdcf"} echo PREFIX is "$PREFIX" echo SYSROOT is "$SYSROOT" @@ -42,11 +42,6 @@ pushd "$DIR/Tarballs" echo "Skipped extracting qemu" fi - pushd "$QEMU_VERSION" - patch -p1 < "$DIR/Patches/qemu-cf-protection-none.patch" > /dev/null - md5sum "$DIR/Patches/qemu-cf-protection-none.patch" > .patch.applied - popd - popd mkdir -p "$PREFIX" diff --git a/Toolchain/Patches/qemu-cf-protection-none.patch b/Toolchain/Patches/qemu-cf-protection-none.patch deleted file mode 100644 index 6076930052..0000000000 --- a/Toolchain/Patches/qemu-cf-protection-none.patch +++ /dev/null @@ -1,37 +0,0 @@ -Subject: [PATCH] build: fix build failure with gcc 11.2 by disabling -fcf-protection -Date: Tue, 8 Feb 2022 13:19:37 -0800 [thread overview] -Message-ID: <20220208211937.79580-1-vineetg@rivosinc.com> (raw) - -When doing RV qemu builds with host gcc 11.2, ran into following build failure - -| cc -MMD -MP -MT linuxboot_dma.o -MF ./linuxboot_dma.d -O2 -g -march=i486 -Wall \ -| -Wstrict-prototypes -Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes \ -| -Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security \ -| -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs \ -| -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2 -Wno-missing-include-dirs \ -| -Wno-shift-negative-value -Wno-psabi -fno-pie -ffreestanding -IQEMU/include \ -| -fno-stack-protector -m16 -Wa,-32 \ -| -c QEMU/pc-bios/optionrom/linuxboot_dma.c -o linuxboot_dma.o -|cc1: error: ‘-fcf-protection’ is not compatible with this target - -Signed-off-by: Vineet Gupta ---- -This might be a crude fix to the problem ---- - pc-bios/optionrom/Makefile | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile -index 5d55d25acca2..8f843ee803c1 100644 ---- a/pc-bios/optionrom/Makefile -+++ b/pc-bios/optionrom/Makefile -@@ -22,6 +22,9 @@ override CFLAGS += $(CFLAGS_NOPIE) -ffreestanding -I$(TOPSRC_DIR)/include - override CFLAGS += $(call cc-option, -fno-stack-protector) - override CFLAGS += $(call cc-option, -m16) - -+# issue with gcc 11.2 -+override CFLAGS += $(call cc-option, -fcf-protection=none) -+ - ifeq ($(filter -m16, $(CFLAGS)),) - # Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??) - # On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with