As per comment #4, i made the same change:

doug@serv-ee:~/temp-k-git/linux$ git diff
diff --git a/Makefile b/Makefile
index 3e4868a6498b..68f0858484a5 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-register
+RETPOLINE_VDSO_CFLAGS_GCC := -mindirect-branch-register
 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)))

And while the kernel compile had a constant stream of warnings, the
resulting kernel (5.2) works fine.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1830961

Title:
  Kernels & kernel drivers fail to build with gcc-9 [error: ‘-mindirect-
  branch’ and ‘-fcf-protection’ are not compatible]

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1830961/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to