OSDN Git Service

[PATCH] fix incorrect use of -fno-unit-at-a-time on GCC >= 4
[linux-kernel-docs/linux-2.4.36.git] / Makefile
index 6f23ba2..71b6652 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,7 @@ endif
 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
 
 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+if_gcc4 = $(shell if echo __GNUC__ | $(CC) -E -xc - | grep -q '^4$$' > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
 
 # disable pointer signedness warnings in gcc 4.0
 CFLAGS += $(call check_gcc,-Wno-pointer-sign,)