If I make the same changes to the Makefile as per the link in comment #16, then the kernel compiles fine and without the zillions of warnings I mentioned in comment #13. However I can not find this anywhere "upstream" as the notes seem to indicate.
doug@serv-ee:~/temp-k-git/linux$ git diff diff --git a/Makefile b/Makefile index 3e4868a6498b..d8ccc47215be 100644 --- a/Makefile +++ b/Makefile @@ -630,8 +630,8 @@ ifdef CONFIG_FUNCTION_TRACER CC_FLAGS_FTRACE := -pg endif
-RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register -RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch=thunk-inline -mindirect-branch-register +RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register -fcf-protection=none +RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch=thunk-inline -mindirect-branch-register -fcf-protection=none RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk RETPOLINE_VDSO_CFLAGS_CLANG := -mretpoline RETPOLINE_CFLAGS := $(call cc-option,$(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
If I make the same changes to the Makefile as per the link in comment #16, then the kernel compiles fine and without the zillions of warnings I mentioned in comment #13. However I can not find this anywhere "upstream" as the notes seem to indicate.
doug@serv- ee:~/temp- k-git/linux$ git diff .d8ccc47215be 100644 FUNCTION_ TRACER
diff --git a/Makefile b/Makefile
index 3e4868a6498b.
--- a/Makefile
+++ b/Makefile
@@ -630,8 +630,8 @@ ifdef CONFIG_
CC_FLAGS_FTRACE := -pg
endif
-RETPOLINE_ CFLAGS_ GCC := -mindirect- branch= thunk-extern -mindirect- branch- register VDSO_CFLAGS_ GCC := -mindirect- branch= thunk-inline -mindirect- branch- register CFLAGS_ GCC := -mindirect- branch= thunk-extern -mindirect- branch- register -fcf-protection =none VDSO_CFLAGS_ GCC := -mindirect- branch= thunk-inline -mindirect- branch- register -fcf-protection =none CFLAGS_ CLANG := -mretpoline- external- thunk VDSO_CFLAGS_ CLANG := -mretpoline $(RETPOLINE_ CFLAGS_ GCC),$( call cc-option, $(RETPOLINE_ CFLAGS_ CLANG)) )
-RETPOLINE_
+RETPOLINE_
+RETPOLINE_
RETPOLINE_
RETPOLINE_
RETPOLINE_CFLAGS := $(call cc-option,