* [PATCH] x86: turn off -fcf-protection for realmode
@ 2021-03-23 12:48 Arnd Bergmann
2021-03-23 15:38 ` [tip: x86/urgent] x86/build: Turn off -fcf-protection for realmode targets tip-bot2 for Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-03-23 12:48 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86
Cc: Arnd Bergmann, H. Peter Anvin, Nick Desaulniers, Masahiro Yamada,
Jason A. Donenfeld, Arvind Sankar, Sami Tolvanen, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
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 <arnd@arndb.de>
---
arch/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 5689d799bd12..0a1278512cc9 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -27,7 +27,7 @@ endif
REALMODE_CFLAGS := -m16 -Os -DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
- -mno-mmx -mno-sse
+ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
REALMODE_CFLAGS += -ffreestanding
REALMODE_CFLAGS += -fno-stack-protector
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: x86/urgent] x86/build: Turn off -fcf-protection for realmode targets
2021-03-23 12:48 [PATCH] x86: turn off -fcf-protection for realmode Arnd Bergmann
@ 2021-03-23 15:38 ` tip-bot2 for Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2021-03-23 15:38 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Arnd Bergmann, Ingo Molnar, x86, linux-kernel
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: 9fcb51c14da2953de585c5c6e50697b8a6e91a7b
Gitweb: https://git.kernel.org/tip/9fcb51c14da2953de585c5c6e50697b8a6e91a7b
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Tue, 23 Mar 2021 13:48:36 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Tue, 23 Mar 2021 16:36:01 +01:00
x86/build: Turn off -fcf-protection for realmode targets
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 <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20210323124846.1584944-1-arnd@kernel.org
---
arch/x86/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 2d6d5a2..9a85eae 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -27,7 +27,7 @@ endif
REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
- -mno-mmx -mno-sse
+ -mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
REALMODE_CFLAGS += -ffreestanding
REALMODE_CFLAGS += -fno-stack-protector
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-23 15:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 12:48 [PATCH] x86: turn off -fcf-protection for realmode Arnd Bergmann
2021-03-23 15:38 ` [tip: x86/urgent] x86/build: Turn off -fcf-protection for realmode targets tip-bot2 for Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).