From 06f5589fc3357db42b526ae32dad0553a136f556 Mon Sep 17 00:00:00 2001 From: Nikolay Borisov Date: Jan 30 2024 15:08:44 +0000 Subject: x86/build: Turn off -fcf-protection for realmode targets (git-fixes). --- diff --git a/patches.suse/x86-build-Turn-off-fcf-protection-for-realmode-targets.patch b/patches.suse/x86-build-Turn-off-fcf-protection-for-realmode-targets.patch new file mode 100644 index 0000000..62f15d3 --- /dev/null +++ b/patches.suse/x86-build-Turn-off-fcf-protection-for-realmode-targets.patch @@ -0,0 +1,36 @@ +From: Arnd Bergmann +Date: Tue, 23 Mar 2021 13:48:36 +0100 +Subject: x86/build: Turn off -fcf-protection for realmode targets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Git-commit: 9fcb51c14da2953de585c5c6e50697b8a6e91a7b +Patch-mainline: v5.12-rc5 +References: git-fixes + +The new Ubuntu GCC packages turn on -fcf-protection globally, +which causes a build failure in the x86 realmode code: + + cc1: error: ‘-fcf-protection’ is not compatible with this target + +Turn it off explicitly on compilers that understand this option. + +Signed-off-by: Arnd Bergmann +Signed-off-by: Ingo Molnar +Link: https://lore.kernel.org/r/20210323124846.1584944-1-arnd@kernel.org + +Acked-by: Nikolay Borisov +--- + arch/x86/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/Makefile ++++ b/arch/x86/Makefile +@@ -25,6 +25,7 @@ REALMODE_CFLAGS := $(M16_CFLAGS) -g -Os + -Wall -Wstrict-prototypes -march=i386 -mregparm=3 \ + -fno-strict-aliasing -fomit-frame-pointer -fno-pic \ + -mno-mmx -mno-sse \ ++ $(call cc-option,-fcf-protection=none) \ + $(call cc-option, -ffreestanding) \ + $(call cc-option, -fno-stack-protector) \ + $(call cc-option, -mpreferred-stack-boundary=2) diff --git a/series.conf b/series.conf index b58b660..a2547a1 100644 --- a/series.conf +++ b/series.conf @@ -60562,6 +60562,7 @@ patches.suse/smb3-fix-cached-file-size-problems-in-duplicate-extents-reflink-.patch patches.suse/locking-mutex-Fix-non-debug-version-of-mutex_lock_io.patch patches.suse/x86-mem_encrypt-correct-physical-address-calculation-in-_set_clr_pte_enc.patch + patches.suse/x86-build-Turn-off-fcf-protection-for-realmode-targets.patch patches.suse/xen-blkback-don-t-leak-persistent-grants-from-xen_bl.patch patches.suse/reiserfs-update-reiserfs_xattrs_initialized-conditio.patch patches.suse/drm-imx-imx-ldb-fix-out-of-bounds-array-access-warni.patch