Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] mips: there is no __GNUC_MAJOR__
@ 2007-01-23 18:30 Alexey Dobriyan
  2007-01-24  0:22 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2007-01-23 18:30 UTC (permalink / raw)
  To: akpm, ralf; +Cc: linux-mips

gcc major version number is in __GNUC__. As side effect fix checking with
sparse if sparse was built with gcc 4.1 and mips cross-compiler is 3.4.

sparse will inherit version 4.1, __GNUC__ won't be filtered from
"-dM -E -xc" output, sparse will pick only new major, effectively becoming
gcc version 3.1 which is unsupported.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 arch/mips/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -623,7 +623,8 @@ LDFLAGS			+= -m $(ld-emul)
 
 ifdef CONFIG_MIPS
 CHECKFLAGS += $(shell $(CC) $(CFLAGS) -dM -E -xc /dev/null | \
-	egrep -vw '__GNUC_(MAJOR|MINOR|PATCHLEVEL)__' | \
+	egrep -vw '__GNUC__' | \
+	egrep -vw '__GNUC_(MINOR|PATCHLEVEL)__' | \
 	sed -e 's/^\#define /-D/' -e "s/ /='/" -e "s/$$/'/")
 ifdef CONFIG_64BIT
 CHECKFLAGS		+= -m64

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-01-24  0:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 18:30 [PATCH] mips: there is no __GNUC_MAJOR__ Alexey Dobriyan
2007-01-24  0:22 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox