From: Nicholas Piggin <npiggin@gmail.com>
To: Joel Stanley <joel@jms.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer
Date: Fri, 14 Sep 2018 15:08:54 +1000 [thread overview]
Message-ID: <20180914050854.6214-4-npiggin@gmail.com> (raw)
In-Reply-To: <20180914050854.6214-1-npiggin@gmail.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
arch/powerpc/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index be47cf8a0798..07d9dce7eda6 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -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))
--
2.18.0
next prev parent reply other threads:[~2018-09-14 5:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-14 5:08 [PATCH 0/3] -mno-sched-epilog removal Nicholas Piggin
2018-09-14 5:08 ` [PATCH 1/3] powerpc: remove old GCC version checks Nicholas Piggin
2018-09-17 2:31 ` Joel Stanley
2018-09-20 4:21 ` [1/3] " Michael Ellerman
2018-09-14 5:08 ` [PATCH 2/3] powerpc: consolidate -mno-sched-epilog into FTRACE flags Nicholas Piggin
2018-09-17 2:32 ` Joel Stanley
2018-09-14 5:08 ` Nicholas Piggin [this message]
2018-09-17 2:36 ` [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Joel Stanley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180914050854.6214-4-npiggin@gmail.com \
--to=npiggin@gmail.com \
--cc=joel@jms.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.