aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSam Ravnborg <sam@neptun.(none)>2007-10-15 16:17:25 -0400
committerSam Ravnborg <sam@neptun.(none)>2007-10-15 16:17:25 -0400
commit06c5040cdb13d27adad118f2fbfae905a1911b37 (patch)
treee5e62e04ca2d6f834aed9925a13869f730656139 /arch
parent52bcc3308ae3344266f55bf98a22c1ac0201eda7 (diff)
kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
The variable CPPFLAGS is a wellknown variable and the usage by kbuild may result in unexpected behaviour. This patch replace use of CPPFLAGS with KBUILD_CPPFLAGS all over the tree and enabling one to use: make CPPFLAGS=... to specify additional CPP commandline options. Patch was tested on following architectures: alpha, arm, i386, x86_64, mips, sparc, sparc64, ia64, m68k, s390 Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/Makefile4
-rw-r--r--arch/ia64/Makefile2
-rw-r--r--arch/powerpc/Makefile2
-rw-r--r--arch/ppc/Makefile2
-rw-r--r--arch/um/Makefile-x86_642
5 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index b762d235b81a..0d450e757e0e 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -32,11 +32,11 @@ KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
32endif 32endif
33 33
34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 34ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
35CPPFLAGS += -mbig-endian 35KBUILD_CPPFLAGS += -mbig-endian
36AS += -EB 36AS += -EB
37LD += -EB 37LD += -EB
38else 38else
39CPPFLAGS += -mlittle-endian 39KBUILD_CPPFLAGS += -mlittle-endian
40AS += -EL 40AS += -EL
41LD += -EL 41LD += -EL
42endif 42endif
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 9708a29c70b5..34951aa2370b 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -29,7 +29,7 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
29CFLAGS_KERNEL := -mconstant-gp 29CFLAGS_KERNEL := -mconstant-gp
30 30
31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 31GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
32CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 32KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
33 33
34ifeq ($(GAS_STATUS),buggy) 34ifeq ($(GAS_STATUS),buggy)
35$(error Sorry, you need a newer version of the assember, one that is built from \ 35$(error Sorry, you need a newer version of the assember, one that is built from \
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 462bb89b67e8..4e165342210a 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -75,7 +75,7 @@ CPPFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) 75AFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH)
76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc 76CFLAGS-$(CONFIG_PPC64) := -mminimal-toc -mtraceback=none -mcall-aixdesc
77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple 77CFLAGS-$(CONFIG_PPC32) := -Iarch/$(ARCH) -ffixed-r2 -mmultiple
78CPPFLAGS += $(CPPFLAGS-y) 78KBUILD_CPPFLAGS += $(CPPFLAGS-y)
79KBUILD_AFLAGS += $(AFLAGS-y) 79KBUILD_AFLAGS += $(AFLAGS-y)
80KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y) 80KBUILD_CFLAGS += -msoft-float -pipe $(CFLAGS-y)
81CPP = $(CC) -E $(KBUILD_CFLAGS) 81CPP = $(CC) -E $(KBUILD_CFLAGS)
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index dd63ccb66732..95894ef7beaa 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -22,7 +22,7 @@ endif
22 22
23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic 23LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
24# The -Iarch/$(ARCH)/include is temporary while we are merging 24# The -Iarch/$(ARCH)/include is temporary while we are merging
25CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include 25KBUILD_CPPFLAGS += -Iarch/$(ARCH) -Iarch/$(ARCH)/include
26KBUILD_AFLAGS += -Iarch/$(ARCH) 26KBUILD_AFLAGS += -Iarch/$(ARCH)
27KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ 27KBUILD_CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \
28 -ffixed-r2 -mmultiple 28 -ffixed-r2 -mmultiple
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index 8836f0df36aa..bcfd6ea30030 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -14,7 +14,7 @@ KBUILD_CFLAGS += $(_extra_flags_)
14CHECKFLAGS += -m64 14CHECKFLAGS += -m64
15KBUILD_AFLAGS += -m64 15KBUILD_AFLAGS += -m64
16LDFLAGS += -m elf_x86_64 16LDFLAGS += -m elf_x86_64
17CPPFLAGS += -m64 17KBUILD_CPPFLAGS += -m64
18 18
19ELF_ARCH := i386:x86-64 19ELF_ARCH := i386:x86-64
20ELF_FORMAT := elf64-x86-64 20ELF_FORMAT := elf64-x86-64