]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available
authorNathan Chancellor <nathan@kernel.org>
Thu, 25 Mar 2021 22:38:07 +0000 (15:38 -0700)
committerPalmer Dabbelt <palmerdabbelt@google.com>
Mon, 26 Apr 2021 15:25:02 +0000 (08:25 -0700)
commit778ede2a27df92703c4ea0433d87a39170baf303
treedc62627c49bed8d533ef81e92b2db3c87f461cd6
parent9c32d4083dece52873dbd4093bafbdff2f95e002
riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available

clang prior to 13.0.0 does not support -fpatchable-function-entry for
RISC-V.

clang: error: unsupported option '-fpatchable-function-entry=8' for target 'riscv64-unknown-linux-gnu'

To avoid this error, only select HAVE_DYNAMIC_FTRACE when this option is
not available.

Fixes: 353cecac5096 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT")
Link: https://github.com/ClangBuiltLinux/linux/issues/1268
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Fangrui Song <maskray@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
arch/riscv/Kconfig