From: Andrew Morton <akpm@osdl.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [patch 2/7] enable unit-at-a-time optimisations for gcc4
Date: Sat, 7 Jan 2006 01:07:57 -0800 [thread overview]
Message-ID: <20060107010757.2e853f77.akpm@osdl.org> (raw)
In-Reply-To: <1136543914.2940.11.camel@laptopd505.fenrus.org>
Arjan van de Ven <arjan@infradead.org> wrote:
>
> allow gcc4 compilers to optimize unit-at-a-time.
>
> This flag enables gcc to "see" the entire C file before making optimisation
> decisions such as inline, which results in gcc making better decisions. One
> of the immediate effects of this is that static functions that are used only
> once now get inlined.
>
> gcc 3.4 has this flag as well, however gcc 3.x have a problem with inlining
> and stacks and as a result, enabling this flag there would cause excessive
> and unacceptable stack use. This problem is fixed in the gcc 4.x series.
> The x86-64 architecture already enables this feature so it's well tested
> already.
bix:/usr/src/25> make vmlinux
/bin/sh: line 1: [: -lt: unary operator expected
Because GCC_VERSION hasn't been initialised at this stage.
<wonders about the testing status of this one>
Is there any reason why we can't do this?
From: Andrew Morton <akpm@osdl.org>
Set GCC_VERSION up-front rather than in arch Makefiles. This reduces ordering
problems and generally consolidates things.
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
Makefile | 2 +-
arch/ia64/Makefile | 1 -
arch/parisc/Makefile | 4 ----
arch/powerpc/Makefile | 2 --
arch/ppc/Makefile | 1 -
5 files changed, 1 insertion(+), 9 deletions(-)
diff -puN arch/ia64/Makefile~kbuild-call-gcc_version-earlier arch/ia64/Makefile
--- devel/arch/ia64/Makefile~kbuild-call-gcc_version-earlier 2006-01-07 01:05:39.000000000 -0800
+++ devel-akpm/arch/ia64/Makefile 2006-01-07 01:05:39.000000000 -0800
@@ -25,7 +25,6 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -
-falign-functions=32 -frename-registers -fno-optimize-sibling-calls
CFLAGS_KERNEL := -mconstant-gp
-GCC_VERSION := $(call cc-version)
GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
diff -puN arch/parisc/Makefile~kbuild-call-gcc_version-earlier arch/parisc/Makefile
--- devel/arch/parisc/Makefile~kbuild-call-gcc_version-earlier 2006-01-07 01:05:39.000000000 -0800
+++ devel-akpm/arch/parisc/Makefile 2006-01-07 01:05:39.000000000 -0800
@@ -35,10 +35,6 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-commo
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
-GCC_VERSION := $(call cc-version)
-ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
-$(error Sorry, couldn't find ($(cc-version)).)
-endif
ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
$(error Sorry, your compiler is too old ($(GCC_VERSION)). GCC v3.3 or above is required.)
endif
diff -puN arch/powerpc/Makefile~kbuild-call-gcc_version-earlier arch/powerpc/Makefile
--- devel/arch/powerpc/Makefile~kbuild-call-gcc_version-earlier 2006-01-07 01:05:39.000000000 -0800
+++ devel-akpm/arch/powerpc/Makefile 2006-01-07 01:05:39.000000000 -0800
@@ -76,7 +76,6 @@ LINUXINCLUDE += $(LINUXINCLUDE-y)
CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
ifeq ($(CONFIG_PPC64),y)
-GCC_VERSION := $(call cc-version)
GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi)
ifeq ($(CONFIG_POWER4_ONLY),y)
@@ -189,7 +188,6 @@ TOUT := .tmp_gas_check
# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
# instructions.
# gcc-3.4 and binutils-2.14 are a fatal combination.
-GCC_VERSION := $(call cc-version)
checkbin:
@if test "$(GCC_VERSION)" = "0304" ; then \
diff -puN arch/ppc/Makefile~kbuild-call-gcc_version-earlier arch/ppc/Makefile
--- devel/arch/ppc/Makefile~kbuild-call-gcc_version-earlier 2006-01-07 01:05:39.000000000 -0800
+++ devel-akpm/arch/ppc/Makefile 2006-01-07 01:05:39.000000000 -0800
@@ -128,7 +128,6 @@ TOUT := .tmp_gas_check
# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
# instructions.
# gcc-3.4 and binutils-2.14 are a fatal combination.
-GCC_VERSION := $(call cc-version)
checkbin:
@if test "$(GCC_VERSION)" = "0304" ; then \
diff -puN Makefile~kbuild-call-gcc_version-earlier Makefile
--- Makefile~kbuild-call-gcc_version-earlier 2006-01-07 01:05:39.000000000 -0800
+++ devel-akpm/Makefile 2006-01-07 01:05:39.000000000 -0800
@@ -300,7 +300,7 @@ cc-option-align = $(subst -functions=0,,
# Usage gcc-ver := $(call cc-version $(CC))
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
$(if $(1), $(1), $(CC)))
-
+GCC_VERSION := $(call cc-version)
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
_
next prev parent reply other threads:[~2006-01-07 9:08 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 10:37 [patch 1/7] Make __always_inline actually force always inlining Arjan van de Ven
2006-01-06 10:38 ` [patch 2/7] enable unit-at-a-time optimisations for gcc4 Arjan van de Ven
2006-01-06 17:18 ` Jeff Garzik
2006-01-06 18:48 ` Sam Ravnborg
2006-01-06 19:00 ` Arjan van de Ven
2006-01-06 19:02 ` Jeff Garzik
2006-01-06 23:56 ` Sam Ravnborg
2006-01-07 0:05 ` Andi Kleen
2006-01-07 0:20 ` Matt Mackall
2006-01-07 1:11 ` Andi Kleen
2006-01-07 8:47 ` Sam Ravnborg
2006-01-07 9:07 ` Andrew Morton [this message]
2006-01-07 10:03 ` Sam Ravnborg
2006-01-07 10:13 ` Andrew Morton
2006-01-07 12:00 ` Sam Ravnborg
2006-01-06 10:39 ` [patch 3/7] mark several functions __always_inline Arjan van de Ven
2006-01-06 10:41 ` [patch 4/7] Mark some key VFS functions as __always_inline Arjan van de Ven
2006-01-06 10:50 ` Al Viro
2006-01-06 10:42 ` [patch 5/7] uninline capable() Arjan van de Ven
2006-01-06 11:18 ` Michael Buesch
2006-01-06 11:22 ` Arjan van de Ven
2006-01-06 11:26 ` Michael Buesch
2006-01-08 5:51 ` [PATCH 1/4] move capable() to capability.h Randy.Dunlap
2006-01-08 7:45 ` Valdis.Kletnieks
2006-01-08 13:48 ` Randy.Dunlap
2006-01-08 18:02 ` Tim Schmielau
2006-01-09 1:55 ` Randy.Dunlap
2006-01-08 18:15 ` Tim Schmielau
2006-01-08 19:03 ` Andrew Morton
2006-01-08 17:19 ` [patch 5/7] uninline capable() Tim Schmielau
2006-01-07 0:28 ` Matt Mackall
2006-01-06 10:43 ` [patch 6/7] Unlinline a bunch of other functions Arjan van de Ven
2006-01-06 12:11 ` [PATCH] pktcdvd: Un-inline some functions Peter Osterlund
2006-01-06 17:29 ` [patch 6/7] Unlinline a bunch of other functions Jeff Garzik
2006-01-07 6:28 ` Andrew Morton
2006-01-06 10:45 ` [patch 7/7] Make "inline" no longer mandatory for gcc 4.x Arjan van de Ven
2006-01-06 17:31 ` Jeff Garzik
2006-01-06 19:35 ` Arjan van de Ven
2006-01-07 6:33 ` Andrew Morton
2006-01-07 8:34 ` Arjan van de Ven
2006-01-07 19:05 ` Kurt Wall
2006-01-07 19:10 ` Arjan van de Ven
2006-01-07 19:44 ` Arjan van de Ven
2006-01-07 22:13 ` Kurt Wall
2006-01-08 3:16 ` Kurt Wall
2006-01-08 3:56 ` Mitchell Blank Jr
2006-01-08 7:14 ` Kurt Wall
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=20060107010757.2e853f77.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sam@ravnborg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome