]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - Makefile
ceph: only allow punch hole mode in fallocate
[mirror_ubuntu-bionic-kernel.git] / Makefile
index c78f3d71a905a59ea735b9e125a367308f288a0d..9f0c7b54e053e708247910cce8377f194cdad488 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -869,6 +869,15 @@ KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
 # Require designated initializers for all marked structures
 KBUILD_CFLAGS   += $(call cc-option,-Werror=designated-init)
 
+# ensure -fcf-protection is disabled when using retpoline as it is
+# incompatible with -mindirect-branch=thunk-extern
+ifdef CONFIG_RETPOLINE
+KBUILD_CFLAGS += $(call cc-option,-fcf-protection=none)
+endif
+
+# change __FILE__ to the relative path from the srctree
+KBUILD_CFLAGS  += $(call cc-option,-fmacro-prefix-map=$(srctree)/=)
+
 # use the deterministic mode of AR if available
 KBUILD_ARFLAGS := $(call ar-option,D)