powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer

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>
This commit is contained in:
Nicholas Piggin 2018-09-14 15:08:54 +10:00 committed by Michael Ellerman
parent 2a056f58fd
commit 6977f95e63
1 changed files with 6 additions and 2 deletions

View File

@ -165,8 +165,12 @@ CC_FLAGS_FTRACE := -pg
ifdef CONFIG_MPROFILE_KERNEL ifdef CONFIG_MPROFILE_KERNEL
CC_FLAGS_FTRACE += -mprofile-kernel CC_FLAGS_FTRACE += -mprofile-kernel
endif endif
# Work around a gcc code-gen bug with -fno-omit-frame-pointer. # Work around gcc code-gen bugs with -pg / -fno-omit-frame-pointer in gcc <= 4.8
CC_FLAGS_FTRACE += -mno-sched-epilog # 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 endif
CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU))