Skip to content

Commit adebc88

Browse files
nathanchancepalmer-dabbelt
authored andcommitted
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: afc76b8 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Link: ClangBuiltLinux#1268 Reported-by: kernel test robot <[email protected]> Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Fangrui Song <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 7ce0477 commit adebc88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ config ARCH_RV64I
231231
bool "RV64I"
232232
select 64BIT
233233
select ARCH_SUPPORTS_INT128 if CC_HAS_INT128 && GCC_VERSION >= 50000
234-
select HAVE_DYNAMIC_FTRACE if MMU
234+
select HAVE_DYNAMIC_FTRACE if MMU && $(cc-option,-fpatchable-function-entry=8)
235235
select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
236236
select HAVE_FTRACE_MCOUNT_RECORD
237237
select HAVE_FUNCTION_GRAPH_TRACER

0 commit comments

Comments
 (0)