Skip to content

Commit

Permalink
powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Nicholas Piggin authored and Michael Ellerman committed Sep 19, 2018
1 parent 2a056f5 commit 6977f95
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/powerpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,12 @@ CC_FLAGS_FTRACE := -pg
ifdef CONFIG_MPROFILE_KERNEL
CC_FLAGS_FTRACE += -mprofile-kernel
endif
# Work around a gcc code-gen bug with -fno-omit-frame-pointer.
CC_FLAGS_FTRACE += -mno-sched-epilog
# Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44199
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52828
ifneq ($(cc-name),clang)
CC_FLAGS_FTRACE += $(call cc-ifversion, -lt, 0409, -mno-sched-epilog)
endif
endif

CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))
Expand Down

0 comments on commit 6977f95

Please sign in to comment.