aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-10-13 13:20:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-10-13 13:20:53 -0400
commit25d591587d3b0676fb89c29e7e55fe4a08597ec1 (patch)
tree90f1d5d3bab243e14138d47bd9b9c1bb5613fb17 /Makefile
parent86ae13b006e48959981248493efd3ff4b2828b3d (diff)
parent2331d1a6cd3d6e580bc88b9a160066d9e1177fe1 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: kbuild: revert "save ARCH & CROSS_COMPILE ..." warn about use of uninstalled kernel headers kbuild: mkcompile_h: trivial cleanups kbuild: fix warning when domainname is not available kbuild: Fix size_append issue for bzip2/lzma kernel kbuild,scripts: use non-builtin echo for '-e' kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile46
1 files changed, 2 insertions, 44 deletions
diff --git a/Makefile b/Makefile
index 927d7a32ed9e..326791575b0a 100644
--- a/Makefile
+++ b/Makefile
@@ -179,46 +179,9 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
179# Alternatively CROSS_COMPILE can be set in the environment. 179# Alternatively CROSS_COMPILE can be set in the environment.
180# Default value for CROSS_COMPILE is not to prefix executables 180# Default value for CROSS_COMPILE is not to prefix executables
181# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile 181# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
182#
183# To force ARCH and CROSS_COMPILE settings include kernel.* files
184# in the kernel tree - do not patch this file.
185export KBUILD_BUILDHOST := $(SUBARCH) 182export KBUILD_BUILDHOST := $(SUBARCH)
186 183ARCH ?= $(SUBARCH)
187# Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files. 184CROSS_COMPILE ?=
188# Restore these settings and check that user did not specify
189# conflicting values.
190
191saved_arch := $(shell cat include/generated/kernel.arch 2> /dev/null)
192saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null)
193
194ifneq ($(CROSS_COMPILE),)
195 ifneq ($(saved_cross),)
196 ifneq ($(CROSS_COMPILE),$(saved_cross))
197 $(error CROSS_COMPILE changed from \
198 "$(saved_cross)" to \
199 to "$(CROSS_COMPILE)". \
200 Use "make mrproper" to fix it up)
201 endif
202 endif
203else
204 CROSS_COMPILE := $(saved_cross)
205endif
206
207ifneq ($(ARCH),)
208 ifneq ($(saved_arch),)
209 ifneq ($(saved_arch),$(ARCH))
210 $(error ARCH changed from \
211 "$(saved_arch)" to "$(ARCH)". \
212 Use "make mrproper" to fix it up)
213 endif
214 endif
215else
216 ifneq ($(saved_arch),)
217 ARCH := $(saved_arch)
218 else
219 ARCH := $(SUBARCH)
220 endif
221endif
222 185
223# Architecture as present in compile.h 186# Architecture as present in compile.h
224UTS_MACHINE := $(ARCH) 187UTS_MACHINE := $(ARCH)
@@ -483,11 +446,6 @@ ifeq ($(config-targets),1)
483include $(srctree)/arch/$(SRCARCH)/Makefile 446include $(srctree)/arch/$(SRCARCH)/Makefile
484export KBUILD_DEFCONFIG KBUILD_KCONFIG 447export KBUILD_DEFCONFIG KBUILD_KCONFIG
485 448
486# save ARCH & CROSS_COMPILE settings
487$(shell mkdir -p include/generated && \
488 echo $(ARCH) > include/generated/kernel.arch && \
489 echo $(CROSS_COMPILE) > include/generated/kernel.cross)
490
491config: scripts_basic outputmakefile FORCE 449config: scripts_basic outputmakefile FORCE
492 $(Q)mkdir -p include/linux include/config 450 $(Q)mkdir -p include/linux include/config
493 $(Q)$(MAKE) $(build)=scripts/kconfig $@ 451 $(Q)$(MAKE) $(build)=scripts/kconfig $@