Merge tag 'for-5.15/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux-2.6-microblaze.git] / Makefile
index 79284e3..ec9e8a0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -846,6 +846,11 @@ endif
 # for the randomize_kstack_offset feature. Disable it for all compilers.
 KBUILD_CFLAGS  += $(call cc-option, -fno-stack-clash-protection)
 
 # for the randomize_kstack_offset feature. Disable it for all compilers.
 KBUILD_CFLAGS  += $(call cc-option, -fno-stack-clash-protection)
 
+# Clear used registers at func exit (to reduce data lifetime and ROP gadgets).
+ifdef CONFIG_ZERO_CALL_USED_REGS
+KBUILD_CFLAGS  += -fzero-call-used-regs=used-gpr
+endif
+
 DEBUG_CFLAGS   :=
 
 # Workaround for GCC versions < 5.0
 DEBUG_CFLAGS   :=
 
 # Workaround for GCC versions < 5.0