aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
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 /scripts
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 'scripts')
-rw-r--r--scripts/Makefile.lib6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 2837adaa9850..95e6e0fbdbd0 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -86,7 +86,7 @@ modname_flags = $(if $(filter 1,$(words $(modname))),\
86 86
87_c_flags = $(KBUILD_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o) 87_c_flags = $(KBUILD_CFLAGS) $(EXTRA_CFLAGS) $(CFLAGS_$(basetarget).o)
88_a_flags = $(KBUILD_AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 88_a_flags = $(KBUILD_AFLAGS) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
89_cpp_flags = $(CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F)) 89_cpp_flags = $(KBUILD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(CPPFLAGS_$(@F))
90 90
91# If building the kernel in a separate objtree expand all occurrences 91# If building the kernel in a separate objtree expand all occurrences
92# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). 92# of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
@@ -106,11 +106,11 @@ __a_flags = $(call flags,_a_flags)
106__cpp_flags = $(call flags,_cpp_flags) 106__cpp_flags = $(call flags,_cpp_flags)
107endif 107endif
108 108
109c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 109c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
110 $(__c_flags) $(modkern_cflags) \ 110 $(__c_flags) $(modkern_cflags) \
111 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) 111 -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags)
112 112
113a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(CPPFLAGS) \ 113a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(KBUILD_CPPFLAGS) \
114 $(__a_flags) $(modkern_aflags) 114 $(__a_flags) $(modkern_aflags)
115 115
116cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags) 116cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(__cpp_flags)