Skip to content

Commit

Permalink
riscv: Fixup wrong ftrace remove cflag
Browse files Browse the repository at this point in the history
We must use $(CC_FLAGS_FTRACE) instead of directly using -pg. It
will cause -fpatchable-function-entry error.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Guo Ren authored and Palmer Dabbelt committed Jan 14, 2021

Unverified

No user is associated with the committer email.
1 parent edfcf91 commit 67d9457
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/riscv/kernel/Makefile
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
#

ifdef CONFIG_FTRACE
CFLAGS_REMOVE_ftrace.o = -pg
CFLAGS_REMOVE_patch.o = -pg
CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
endif

extra-y += head.o
2 changes: 1 addition & 1 deletion arch/riscv/mm/Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@

CFLAGS_init.o := -mcmodel=medany
ifdef CONFIG_FTRACE
CFLAGS_REMOVE_init.o = -pg
CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
endif

KCOV_INSTRUMENT_init.o := n

0 comments on commit 67d9457

Please sign in to comment.