* [PATCH 0/3] -mno-sched-epilog removal @ 2018-09-14 5:08 Nicholas Piggin 2018-09-14 5:08 ` [PATCH 1/3] powerpc: remove old GCC version checks Nicholas Piggin ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Nicholas Piggin @ 2018-09-14 5:08 UTC (permalink / raw) To: Joel Stanley; +Cc: Nicholas Piggin, linuxppc-dev This removes -mno-sched-epilog on clang and gcc 4.9 and newer. Not tested with old compilers though. Nicholas Piggin (3): powerpc: remove old GCC version checks powerpc: consolidate -mno-sched-epilog into FTRACE flags powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer arch/powerpc/Makefile | 47 ++++++------------------ arch/powerpc/kernel/Makefile | 8 ++-- arch/powerpc/kernel/trace/Makefile | 2 +- arch/powerpc/platforms/powermac/Makefile | 2 +- arch/powerpc/xmon/Makefile | 2 +- 5 files changed, 19 insertions(+), 42 deletions(-) -- 2.18.0 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/3] powerpc: remove old GCC version checks 2018-09-14 5:08 [PATCH 0/3] -mno-sched-epilog removal Nicholas Piggin @ 2018-09-14 5:08 ` 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-14 5:08 ` [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Nicholas Piggin 2 siblings, 2 replies; 8+ messages in thread From: Nicholas Piggin @ 2018-09-14 5:08 UTC (permalink / raw) To: Joel Stanley; +Cc: Nicholas Piggin, linuxppc-dev GCC 4.6 is the minimum supported now. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/Makefile | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 11a1acba164a..2ecd0976914a 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -404,36 +404,9 @@ archprepare: checkbin # to stdout and these checks are run even on install targets. TOUT := .tmp_gas_check -# Check gcc and binutils versions: -# - gcc-3.4 and binutils-2.14 are a fatal combination -# - Require gcc 4.0 or above on 64-bit -# - gcc-4.2.0 has issues compiling modules on 64-bit +# Check toolchain versions: +# - gcc-4.6 is the minimum kernel-wide version so nothing required. checkbin: - @if test "$(cc-name)" != "clang" \ - && test "$(cc-version)" = "0304" ; then \ - if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ - echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ - echo 'correctly with gcc-3.4 and your version of binutils.'; \ - echo '*** Please upgrade your binutils or downgrade your gcc'; \ - false; \ - fi ; \ - fi - @if test "$(cc-name)" != "clang" \ - && test "$(cc-version)" -lt "0400" \ - && test "x${CONFIG_PPC64}" = "xy" ; then \ - echo -n "Sorry, GCC v4.0 or above is required to build " ; \ - echo "the 64-bit powerpc kernel." ; \ - false ; \ - fi - @if test "$(cc-name)" != "clang" \ - && test "$(cc-fullversion)" = "040200" \ - && test "x${CONFIG_MODULES}${CONFIG_PPC64}" = "xyy" ; then \ - echo -n '*** GCC-4.2.0 cannot compile the 64-bit powerpc ' ; \ - echo 'kernel with modules enabled.' ; \ - echo -n '*** Please use a different GCC version or ' ; \ - echo 'disable kernel modules' ; \ - false ; \ - fi @if test "x${CONFIG_CPU_LITTLE_ENDIAN}" = "xy" \ && $(LD) --version | head -1 | grep ' 2\.24$$' >/dev/null ; then \ echo -n '*** binutils 2.24 miscompiles weak symbols ' ; \ -- 2.18.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/3] powerpc: remove old GCC version checks 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 1 sibling, 0 replies; 8+ messages in thread From: Joel Stanley @ 2018-09-17 2:31 UTC (permalink / raw) To: Nicholas Piggin; +Cc: linuxppc-dev On Fri, 14 Sep 2018 at 14:39, Nicholas Piggin <npiggin@gmail.com> wrote: > > GCC 4.6 is the minimum supported now. > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [1/3] powerpc: remove old GCC version checks 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 ` Michael Ellerman 1 sibling, 0 replies; 8+ messages in thread From: Michael Ellerman @ 2018-09-20 4:21 UTC (permalink / raw) To: Nicholas Piggin, Joel Stanley; +Cc: linuxppc-dev, Nicholas Piggin On Fri, 2018-09-14 at 05:08:52 UTC, Nicholas Piggin wrote: > GCC 4.6 is the minimum supported now. > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> > Reviewed-by: Joel Stanley <joel@jms.id.au> Series applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/f2910f0e6835339e6ce82cef22fa15 cheers ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] powerpc: consolidate -mno-sched-epilog into FTRACE flags 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-14 5:08 ` Nicholas Piggin 2018-09-17 2:32 ` Joel Stanley 2018-09-14 5:08 ` [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Nicholas Piggin 2 siblings, 1 reply; 8+ messages in thread From: Nicholas Piggin @ 2018-09-14 5:08 UTC (permalink / raw) To: Joel Stanley; +Cc: Nicholas Piggin, linuxppc-dev Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/powerpc/Makefile | 12 ++++++------ arch/powerpc/kernel/Makefile | 8 ++++---- arch/powerpc/kernel/trace/Makefile | 2 +- arch/powerpc/platforms/powermac/Makefile | 2 +- arch/powerpc/xmon/Makefile | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 2ecd0976914a..be47cf8a0798 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -160,8 +160,13 @@ else CFLAGS-$(CONFIG_GENERIC_CPU) += -mcpu=powerpc64 endif +ifdef CONFIG_FUNCTION_TRACER +CC_FLAGS_FTRACE := -pg ifdef CONFIG_MPROFILE_KERNEL - CC_FLAGS_FTRACE := -pg -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 endif CFLAGS-$(CONFIG_TARGET_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_TARGET_CPU)) @@ -229,11 +234,6 @@ ifdef CONFIG_6xx KBUILD_CFLAGS += -mcpu=powerpc endif -# Work around a gcc code-gen bug with -fno-omit-frame-pointer. -ifdef CONFIG_FUNCTION_TRACER -KBUILD_CFLAGS += -mno-sched-epilog -endif - cpu-as-$(CONFIG_4xx) += -Wa,-m405 cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) cpu-as-$(CONFIG_E200) += -Wa,-me200 diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 3b66f2c19c84..1e64cfe22a83 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -22,10 +22,10 @@ CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_cputable.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_prom_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_btext.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) -CFLAGS_REMOVE_prom.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_cputable.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_prom_init.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_btext.o = $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_prom.o = $(CC_FLAGS_FTRACE) endif obj-y := cputable.o ptrace.o syscalls.o \ diff --git a/arch/powerpc/kernel/trace/Makefile b/arch/powerpc/kernel/trace/Makefile index d22d8bafb643..d868ba42032f 100644 --- a/arch/powerpc/kernel/trace/Makefile +++ b/arch/powerpc/kernel/trace/Makefile @@ -7,7 +7,7 @@ subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror ifdef CONFIG_FUNCTION_TRACER # do not trace tracer code -CFLAGS_REMOVE_ftrace.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) endif obj32-$(CONFIG_FUNCTION_TRACER) += ftrace_32.o diff --git a/arch/powerpc/platforms/powermac/Makefile b/arch/powerpc/platforms/powermac/Makefile index f2839eed0f89..561a67d65e4d 100644 --- a/arch/powerpc/platforms/powermac/Makefile +++ b/arch/powerpc/platforms/powermac/Makefile @@ -3,7 +3,7 @@ CFLAGS_bootx_init.o += -fPIC ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code -CFLAGS_REMOVE_bootx_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) +CFLAGS_REMOVE_bootx_init.o = $(CC_FLAGS_FTRACE) endif obj-y += pic.o setup.o time.o feature.o pci.o \ diff --git a/arch/powerpc/xmon/Makefile b/arch/powerpc/xmon/Makefile index 1bc3abb237cd..93cc1f1b8b61 100644 --- a/arch/powerpc/xmon/Makefile +++ b/arch/powerpc/xmon/Makefile @@ -8,7 +8,7 @@ UBSAN_SANITIZE := n # Disable ftrace for the entire directory ORIG_CFLAGS := $(KBUILD_CFLAGS) -KBUILD_CFLAGS = $(subst -mno-sched-epilog,,$(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))) +KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC) -- 2.18.0 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] powerpc: consolidate -mno-sched-epilog into FTRACE flags 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 0 siblings, 0 replies; 8+ messages in thread From: Joel Stanley @ 2018-09-17 2:32 UTC (permalink / raw) To: Nicholas Piggin; +Cc: linuxppc-dev On Fri, 14 Sep 2018 at 14:39, Nicholas Piggin <npiggin@gmail.com> wrote: > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer 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-14 5:08 ` [PATCH 2/3] powerpc: consolidate -mno-sched-epilog into FTRACE flags Nicholas Piggin @ 2018-09-14 5:08 ` Nicholas Piggin 2018-09-17 2:36 ` Joel Stanley 2 siblings, 1 reply; 8+ messages in thread From: Nicholas Piggin @ 2018-09-14 5:08 UTC (permalink / raw) To: Joel Stanley; +Cc: Nicholas Piggin, linuxppc-dev 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 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer 2018-09-14 5:08 ` [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Nicholas Piggin @ 2018-09-17 2:36 ` Joel Stanley 0 siblings, 0 replies; 8+ messages in thread From: Joel Stanley @ 2018-09-17 2:36 UTC (permalink / raw) To: Nicholas Piggin; +Cc: linuxppc-dev On Fri, 14 Sep 2018 at 14:39, Nicholas Piggin <npiggin@gmail.com> wrote: > > Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> I gave this a spin with clang trunk on the powernv kernel and it did the trick. Thanks! mpe, this series supersedes [v2,5/5] powerpc: Remove -mno-sched-epilog (https://patchwork.ozlabs.org/patch/969615/). Cheers, Joel ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-09-20 4:21 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` [PATCH 3/3] powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer Nicholas Piggin 2018-09-17 2:36 ` Joel Stanley
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.