]> git.hungrycats.org Git - linux/commitdiff
Fix up CHECKFLAGS definitions
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 5 Oct 2004 10:29:04 +0000 (03:29 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 5 Oct 2004 10:29:04 +0000 (03:29 -0700)
More recent versions of sparse do not define the Linux-specific
default defines, so we make the main Makefile default to the
regular Linux preprocessor defines (__linux__,  linux, __STDC__
and unix, __unix__).

Also, sparse has long since fixed the default empty define to
be "1" as in regular C, so remove the unnecessary "=1" from
the architecture-specific sparse CHECKFLAGS.

Makefile
arch/alpha/Makefile
arch/arm/Makefile
arch/i386/Makefile
arch/m32r/Makefile
arch/m68k/Makefile
arch/ppc/Makefile
arch/ppc64/Makefile
arch/sparc/Makefile
arch/sparc64/Makefile
arch/x86_64/Makefile

index 16c870f535f38bac23a919ed27ea8aad78c12022..1634ad5397fb3e0286c3f99a93231a2f17cefba2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -326,7 +326,7 @@ DEPMOD              = /sbin/depmod
 KALLSYMS       = scripts/kallsyms
 PERL           = perl
 CHECK          = sparse
-CHECKFLAGS     :=
+CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
 MODFLAGS       = -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
index 2702912059ed04ec20ba3707f2ddd6ef55ff4157..c21132e4f7ef1812d662226ef9dd05dc6a2170cc 100644 (file)
@@ -11,7 +11,7 @@
 NM := $(NM) -B
 
 LDFLAGS_vmlinux        := -static -N #-relax
-CHECKFLAGS     += -D__alpha__=1
+CHECKFLAGS     += -D__alpha__
 cflags-y       := -pipe -mno-fp-regs -ffixed-8
 
 # Determine if we can use the BWX instructions with GAS.
index 014950ba12f606aeb3ebda82024b0115463a6ff0..9f7e01d3ec57384aea6efff0b1f57f278fa55ce3 100644 (file)
@@ -57,7 +57,7 @@ tune-$(CONFIG_CPU_V6)         :=-mtune=strongarm
 CFLAGS         +=-mapcs-32 $(arch-y) $(tune-y) $(call cc-option,-malignment-traps,-mshort-load-bytes) -msoft-float -Uarm
 AFLAGS         +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float
 
-CHECKFLAGS     += -D__arm__=1
+CHECKFLAGS     += -D__arm__
 
 #Default value
 DATAADDR       := .
index 5737a3511bc79eeb32189c9c690bde8e7716aaa1..8fc05ee7c02e312b80341572c3d6ae45792e4123 100644 (file)
@@ -18,7 +18,7 @@
 LDFLAGS                := -m elf_i386
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux :=
-CHECKFLAGS     += -D__i386__=1
+CHECKFLAGS     += -D__i386__
 
 CFLAGS += -pipe -msoft-float
 
index 953804c085528bc8bd258f0b8914e374e911e91a..47a427a3588b2e1037e6a36e8edb5c427ba0416c 100644 (file)
@@ -25,7 +25,7 @@ aflags-$(CONFIG_ISA_M32R)     += -DNO_FPU -Wa,-no-bitinst
 CFLAGS += $(cflags-y)
 AFLAGS += $(aflags-y)
 
-CHECKFLAGS     := $(CHECK) -D__m32r__=1
+CHECKFLAGS     := $(CHECK) -D__m32r__
 
 head-y := arch/m32r/kernel/head.o arch/m32r/kernel/init_task.o
 
index 5eb62709887a05c8cfafa7beac1a8ba88fcf5bc1..59c25bc9dafb34f8ffe616866fd0c2657fa26b03 100644 (file)
@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3
 LDFLAGS_vmlinux = -N
 endif
 
-CHECKFLAGS += -D__mc68000__=1 -I$(shell $(CC) -print-file-name=include)
+CHECKFLAGS += -D__mc68000__ -I$(shell $(CC) -print-file-name=include)
 
 # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2
index 062acb2e3e865951dd833e7fe4c74b28767ff953..53dd5640d3a61d625822dc6db71bb9e674cfea01 100644 (file)
@@ -27,7 +27,7 @@ CFLAGS                += -Iarch/$(ARCH) -msoft-float -pipe \
                -ffixed-r2 -mmultiple
 CPP            = $(CC) -E $(CFLAGS)
 
-CHECKFLAGS     += -D__powerpc__=1
+CHECKFLAGS     += -D__powerpc__
 
 ifndef CONFIG_E500
 CFLAGS         += -mstring
index 7650714f552df4ffc04359e69866e7bb1c3c4c23..59fdc0e27ca10762515e8142883d90a54fd08b16 100644 (file)
@@ -28,7 +28,7 @@ ifeq ($(new_nm),y)
 NM             := $(NM) --synthetic
 endif
 
-CHECKFLAGS     += -m64 -D__powerpc__=1
+CHECKFLAGS     += -m64 -D__powerpc__
 
 LDFLAGS                := -m elf64ppc
 LDFLAGS_vmlinux        := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
index 8852935b4f8b9b58b50b56fa751e257ee5a27c11..7b3bbaf083a69eba5eb524d56a0890d3112a24c5 100644 (file)
@@ -13,7 +13,7 @@
 
 AS              := $(AS) -32
 LDFLAGS                := -m elf32_sparc
-CHECKFLAGS     += -D__sparc__=1
+CHECKFLAGS     += -D__sparc__
 
 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7
 CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
index 789eeaf34c2f6622e9c73ad1787ea865832ef683..58d4c91ca9d778f5d808345de09cdd0e608fd889 100644 (file)
@@ -8,7 +8,7 @@
 # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
 #
 
-CHECKFLAGS     += -D__sparc__=1 -D__sparc_v9__=1
+CHECKFLAGS     += -D__sparc__ -D__sparc_v9__
 
 CPPFLAGS_vmlinux.lds += -Usparc
 
index 02662f3ddadba2b0e30d0bcd704d4a83292460a2..a69f7bcdfc2cdf46e3bb2dbc7d79a4df2785847a 100644 (file)
@@ -37,7 +37,7 @@ LDFLAGS               := -m elf_x86_64
 OBJCOPYFLAGS   := -O binary -R .note -R .comment -S
 LDFLAGS_vmlinux := -e stext
 
-CHECKFLAGS      += -D__x86_64__=1 -m64
+CHECKFLAGS      += -D__x86_64__ -m64
 
 cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8)
 cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona)