diff options
author | James Morris <jmorris@macbook.(none)> | 2009-12-03 01:33:40 -0500 |
---|---|---|
committer | James Morris <jmorris@macbook.(none)> | 2009-12-03 01:33:40 -0500 |
commit | c84d6efd363a3948eb32ec40d46bab6338580454 (patch) | |
tree | 3ba7ac46e6626fe8ac843834588609eb6ccee5c6 /Makefile | |
parent | 7539cf4b92be4aecc573ea962135f246a7a33401 (diff) | |
parent | 22763c5cf3690a681551162c15d34d935308c8d7 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 50 |
1 files changed, 4 insertions, 46 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 32 | 3 | SUBLEVEL = 32 |
4 | EXTRAVERSION = -rc2 | 4 | EXTRAVERSION = |
5 | NAME = Man-Eating Seals of Antiquity | 5 | NAME = Man-Eating Seals of Antiquity |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -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. | ||
185 | export KBUILD_BUILDHOST := $(SUBARCH) | 182 | export KBUILD_BUILDHOST := $(SUBARCH) |
186 | 183 | ARCH ?= $(SUBARCH) | |
187 | # Kbuild save the ARCH and CROSS_COMPILE setting in kernel.* files. | 184 | CROSS_COMPILE ?= |
188 | # Restore these settings and check that user did not specify | ||
189 | # conflicting values. | ||
190 | |||
191 | saved_arch := $(shell cat include/generated/kernel.arch 2> /dev/null) | ||
192 | saved_cross := $(shell cat include/generated/kernel.cross 2> /dev/null) | ||
193 | |||
194 | ifneq ($(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 | ||
203 | else | ||
204 | CROSS_COMPILE := $(saved_cross) | ||
205 | endif | ||
206 | |||
207 | ifneq ($(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 | ||
215 | else | ||
216 | ifneq ($(saved_arch),) | ||
217 | ARCH := $(saved_arch) | ||
218 | else | ||
219 | ARCH := $(SUBARCH) | ||
220 | endif | ||
221 | endif | ||
222 | 185 | ||
223 | # Architecture as present in compile.h | 186 | # Architecture as present in compile.h |
224 | UTS_MACHINE := $(ARCH) | 187 | UTS_MACHINE := $(ARCH) |
@@ -258,7 +221,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | |||
258 | 221 | ||
259 | HOSTCC = gcc | 222 | HOSTCC = gcc |
260 | HOSTCXX = g++ | 223 | HOSTCXX = g++ |
261 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | 224 | HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer |
262 | HOSTCXXFLAGS = -O2 | 225 | HOSTCXXFLAGS = -O2 |
263 | 226 | ||
264 | # Decide whether to build built-in, modular, or both. | 227 | # Decide whether to build built-in, modular, or both. |
@@ -483,11 +446,6 @@ ifeq ($(config-targets),1) | |||
483 | include $(srctree)/arch/$(SRCARCH)/Makefile | 446 | include $(srctree)/arch/$(SRCARCH)/Makefile |
484 | export KBUILD_DEFCONFIG KBUILD_KCONFIG | 447 | export 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 | |||
491 | config: scripts_basic outputmakefile FORCE | 449 | config: 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 $@ |