Skip to content

Commit

Permalink
riscv: Fixup wrong ftrace remove cflag
Browse files Browse the repository at this point in the history
commit 67d9457 upstream.

We must use $(CC_FLAGS_FTRACE) instead of directly using -pg. It
will cause -fpatchable-function-entry error.

Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
Signed-off-by: Dimitri John Ledkov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
guoren83 authored and gregkh committed Sep 3, 2021
1 parent b42fde9 commit 7e20872
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion arch/riscv/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e20872

Please sign in to comment.