Commit 18955165 authored by Linus Torvalds's avatar Linus Torvalds

Fix up CHECKFLAGS definitions

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.
parent 00a87a38
......@@ -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)
......
......@@ -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.
......
......@@ -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 := .
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment