* [PATCH 1/2] kbuild: New 'cc-fullversion' macro [not found] <f7ff5aadda1b2962d6c45123ff944e9af6879306.1179593209.git.segher@kernel.crashing.org> @ 2007-05-19 16:49 ` Segher Boessenkool [not found] ` <bd3cddd2f3192e3aba4d7c886e38d8d0037c3510.1179593209.git.segher@kernel.crashing.org> 1 sibling, 0 replies; 5+ messages in thread From: Segher Boessenkool @ 2007-05-19 16:49 UTC (permalink / raw) To: linuxppc-dev; +Cc: sam Prints a six-digit string including the GCC patchlevel. Also fix the 'usage' comment for cc-version. Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> --- scripts/Kbuild.include | 7 ++++++- scripts/gcc-version.sh | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 06c1a37..677bc6c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -100,9 +100,14 @@ cc-option-align = $(subst -functions=0,,\ $(call cc-option,-falign-functions=0,-malign-functions=0)) # cc-version -# Usage gcc-ver := $(call cc-version,$(CC)) +# Usage gcc-ver := $(call cc-version) cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) +# cc-fullversion +# Usage gcc-ver := $(call cc-fullversion) +cc-fullversion = $(shell $(CONFIG_SHELL) \ + $(srctree)/scripts/gcc-version.sh -p $(CC)) + # cc-ifversion # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh index bb4fbea..8a1d187 100644 --- a/scripts/gcc-version.sh +++ b/scripts/gcc-version.sh @@ -1,14 +1,23 @@ #!/bin/sh # -# gcc-version gcc-command +# gcc-version [-p] gcc-command # # Prints the gcc version of `gcc-command' in a canonical 4-digit form # such as `0295' for gcc-2.95, `0303' for gcc-3.3, etc. # +# With the -p option, prints the patchlevel as well, for example `029503' for +# gcc-2.95.3, `030301' for gcc-3.3.1, etc. +# + +if [ $1 = "-p" ] ; then with_patchlevel=1; shift; fi compiler="$*" MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1) MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1) -printf "%02d%02d\\n" $MAJOR $MINOR - +if [ "x$with_patchlevel" != "x" ] ; then + PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1) + printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL +else + printf "%02d%02d\\n" $MAJOR $MINOR +fi -- 1.5.2.rc0.g4342-dirty ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <bd3cddd2f3192e3aba4d7c886e38d8d0037c3510.1179593209.git.segher@kernel.crashing.org>]
* [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES [not found] ` <bd3cddd2f3192e3aba4d7c886e38d8d0037c3510.1179593209.git.segher@kernel.crashing.org> @ 2007-05-19 16:49 ` Segher Boessenkool 2007-05-28 20:28 ` Sam Ravnborg 1 sibling, 0 replies; 5+ messages in thread From: Segher Boessenkool @ 2007-05-19 16:49 UTC (permalink / raw) To: linuxppc-dev; +Cc: sam ...since this won't work (compiler bug, see <http://gcc.gnu.org/PR31490>). Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org> --- arch/powerpc/Makefile | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 6238b58..1447c83 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -202,6 +202,14 @@ checkbin: false; \ fi ; \ fi + @if test "$(call 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 ! /bin/echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; then \ echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' ; \ echo 'correctly with old versions of binutils.' ; \ -- 1.5.2.rc0.g4342-dirty ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES [not found] ` <bd3cddd2f3192e3aba4d7c886e38d8d0037c3510.1179593209.git.segher@kernel.crashing.org> 2007-05-19 16:49 ` [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES Segher Boessenkool @ 2007-05-28 20:28 ` Sam Ravnborg 2007-05-28 22:13 ` Segher Boessenkool 1 sibling, 1 reply; 5+ messages in thread From: Sam Ravnborg @ 2007-05-28 20:28 UTC (permalink / raw) To: Segher Boessenkool; +Cc: linuxppc-dev On Sat, May 19, 2007 at 06:49:08PM +0200, Segher Boessenkool wrote: > ...since this won't work (compiler bug, see <http://gcc.gnu.org/PR31490>). Applied both and documented cc-fullversion too. Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES 2007-05-28 20:28 ` Sam Ravnborg @ 2007-05-28 22:13 ` Segher Boessenkool 2007-05-29 4:32 ` Sam Ravnborg 0 siblings, 1 reply; 5+ messages in thread From: Segher Boessenkool @ 2007-05-28 22:13 UTC (permalink / raw) To: Sam Ravnborg; +Cc: linuxppc-dev >> ...since this won't work (compiler bug, see >> <http://gcc.gnu.org/PR31490>). > > Applied both and documented cc-fullversion too. Thanks! For reference, where should I have documented this? Segher ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES 2007-05-28 22:13 ` Segher Boessenkool @ 2007-05-29 4:32 ` Sam Ravnborg 0 siblings, 0 replies; 5+ messages in thread From: Sam Ravnborg @ 2007-05-29 4:32 UTC (permalink / raw) To: Segher Boessenkool; +Cc: linuxppc-dev On Tue, May 29, 2007 at 12:13:50AM +0200, Segher Boessenkool wrote: > >>...since this won't work (compiler bug, see > >><http://gcc.gnu.org/PR31490>). > > > >Applied both and documented cc-fullversion too. > > Thanks! For reference, where should I have documented this? Documentation/kbuild/makefiles.txt Sam ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-29 4:31 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <f7ff5aadda1b2962d6c45123ff944e9af6879306.1179593209.git.segher@kernel.crashing.org> 2007-05-19 16:49 ` [PATCH 1/2] kbuild: New 'cc-fullversion' macro Segher Boessenkool [not found] ` <bd3cddd2f3192e3aba4d7c886e38d8d0037c3510.1179593209.git.segher@kernel.crashing.org> 2007-05-19 16:49 ` [PATCH 2/2] powerpc: Refuse to build 64-bit with GCC-4.2.0 and CONFIG_MODULES Segher Boessenkool 2007-05-28 20:28 ` Sam Ravnborg 2007-05-28 22:13 ` Segher Boessenkool 2007-05-29 4:32 ` Sam Ravnborg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).