Commit f9a71d16 authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild/all archs: added CHECKFLAGS

Using separate assignment for CHECKFLAGS allows convenient redefinition of CHECK
on the command line:
make CHECK=~/bin64/sparse C=2
to use a special 64 bit version.
Introduced usage in all archs that assined values to CHECK.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent f5ce51c6
......@@ -285,6 +285,7 @@ DEPMOD = /sbin/depmod
KALLSYMS = scripts/kallsyms
PERL = perl
CHECK = sparse
CHECKFLAGS :=
MODFLAGS = -DMODULE
CFLAGS_MODULE = $(MODFLAGS)
AFLAGS_MODULE = $(MODFLAGS)
......@@ -308,7 +309,7 @@ AFLAGS := -D__ASSEMBLY__
export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK
HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB LDFLAGS_MODULE CHECK CHECKFLAGS
export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
......
......@@ -11,7 +11,7 @@
NM := $(NM) -B
LDFLAGS_vmlinux := -static -N #-relax
CHECK := $(CHECK) -D__alpha__=1
CHECKFLAGS += -D__alpha__=1
cflags-y := -pipe -mno-fp-regs -ffixed-8
# Determine if we can use the BWX instructions with GAS.
......
......@@ -58,7 +58,7 @@ tune-$(CONFIG_CPU_V6) :=-mtune=strongarm
CFLAGS +=-mapcs-32 $(arch-y) $(tune-y) $(call check_gcc,-malignment-traps,-mshort-load-bytes) -msoft-float -Wa,-mno-fpu -Uarm
AFLAGS +=-mapcs-32 $(arch-y) $(tune-y) -msoft-float -Wa,-mno-fpu
CHECK := $(CHECK) -D__arm__=1
CHECKFLAGS += -D__arm__=1
#Default value
DATAADDR := .
......
......@@ -18,7 +18,7 @@
LDFLAGS := -m elf_i386
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=
CHECK := $(CHECK) -D__i386__=1
CHECKFLAGS += -D__i386__=1
CFLAGS += -pipe -msoft-float
......
......@@ -28,7 +28,7 @@ ifdef CONFIG_SUN3
LDFLAGS_vmlinux = -N
endif
CHECK := $(CHECK) -D__mc68000__=1 -I$(shell $(CC) -print-file-name=include)
CHECKFLAGS += -D__mc68000__=1 -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 -Wno-uninitialized -mmultiple
CPP = $(CC) -E $(CFLAGS)
CHECK := $(CHECK) -D__powerpc__=1
CHECKFLAGS += -D__powerpc__=1
ifndef CONFIG_E500
CFLAGS += -mstring
......
......@@ -22,7 +22,7 @@ LD := $(LD) -m elf64ppc
CC := $(CC) -m64
endif
CHECK := $(CHECK) -m64 -D__powerpc__=1
CHECKFLAGS += -m64 -D__powerpc__=1
LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
......
......@@ -13,7 +13,7 @@
AS := $(AS) -32
LDFLAGS := -m elf32_sparc
CHECK := $(CHECK) -D__sparc__=1
CHECKFLAGS += -D__sparc__=1
#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)
#
CHECK := $(CHECK) -D__sparc__=1 -D__sparc_v9__=1
CHECKFLAGS += -D__sparc__=1 -D__sparc_v9__=1
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
CHECK := $(CHECK) -D__x86_64__=1
CHECKFLAGS += -D__x86_64__=1
cflags-$(CONFIG_MK8) += $(call check_gcc,-march=k8,)
cflags-$(CONFIG_MPSC) += $(call check_gcc,-march=nocona,)
......
......@@ -85,10 +85,10 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
ifneq ($(KBUILD_CHECKSRC),0)
ifeq ($(KBUILD_CHECKSRC),2)
quiet_cmd_force_checksrc = CHECK $<
cmd_force_checksrc = $(CHECK) $(c_flags) $< ;
cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
else
quiet_cmd_checksrc = CHECK $<
cmd_checksrc = $(CHECK) $(c_flags) $< ;
cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ;
endif
endif
......
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