aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 24 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 1dd58d35d72c..8406d02c6385 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 18 3SUBLEVEL = 18
4EXTRAVERSION = -rc2 4EXTRAVERSION = -rc4
5NAME=Crazed Snow-Weasel 5NAME=Crazed Snow-Weasel
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -309,9 +309,6 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE)
309 309
310CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 310CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
311 -fno-strict-aliasing -fno-common 311 -fno-strict-aliasing -fno-common
312# Force gcc to behave correct even for buggy distributions
313CFLAGS += $(call cc-option, -fno-stack-protector-all \
314 -fno-stack-protector)
315AFLAGS := -D__ASSEMBLY__ 312AFLAGS := -D__ASSEMBLY__
316 313
317# Read KERNELRELEASE from include/config/kernel.release (if it exists) 314# Read KERNELRELEASE from include/config/kernel.release (if it exists)
@@ -368,6 +365,7 @@ endif
368 365
369no-dot-config-targets := clean mrproper distclean \ 366no-dot-config-targets := clean mrproper distclean \
370 cscope TAGS tags help %docs check% \ 367 cscope TAGS tags help %docs check% \
368 include/linux/version.h headers_% \
371 kernelrelease kernelversion 369 kernelrelease kernelversion
372 370
373config-targets := 0 371config-targets := 0
@@ -435,12 +433,13 @@ core-y := usr/
435endif # KBUILD_EXTMOD 433endif # KBUILD_EXTMOD
436 434
437ifeq ($(dot-config),1) 435ifeq ($(dot-config),1)
438# In this section, we need .config 436# Read in config
437-include include/config/auto.conf
439 438
439ifeq ($(KBUILD_EXTMOD),)
440# Read in dependencies to all Kconfig* files, make sure to run 440# Read in dependencies to all Kconfig* files, make sure to run
441# oldconfig if changes are detected. 441# oldconfig if changes are detected.
442-include include/config/auto.conf.cmd 442-include include/config/auto.conf.cmd
443-include include/config/auto.conf
444 443
445# To avoid any implicit rule to kick in, define an empty command 444# To avoid any implicit rule to kick in, define an empty command
446$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; 445$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
@@ -450,16 +449,27 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
450# if auto.conf.cmd is missing then we are probably in a cleaned tree so 449# if auto.conf.cmd is missing then we are probably in a cleaned tree so
451# we execute the config step to be sure to catch updated Kconfig files 450# we execute the config step to be sure to catch updated Kconfig files
452include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd 451include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
453ifeq ($(KBUILD_EXTMOD),)
454 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig 452 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
455else 453else
456 $(error kernel configuration not valid - run 'make prepare' in $(srctree) to update it) 454# external modules needs include/linux/autoconf.h and include/config/auto.conf
457endif 455# but do not care if they are up-to-date. Use auto.conf to trigger the test
456PHONY += include/config/auto.conf
457
458include/config/auto.conf:
459 $(Q)test -e include/linux/autoconf.h -a -e $@ || ( \
460 echo; \
461 echo " ERROR: Kernel configuration is invalid."; \
462 echo " include/linux/autoconf.h or $@ are missing."; \
463 echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
464 echo; \
465 /bin/false)
466
467endif # KBUILD_EXTMOD
458 468
459else 469else
460# Dummy target needed, because used as prerequisite 470# Dummy target needed, because used as prerequisite
461include/config/auto.conf: ; 471include/config/auto.conf: ;
462endif 472endif # $(dot-config)
463 473
464# The all: target is the default when no target is given on the 474# The all: target is the default when no target is given on the
465# command line. 475# command line.
@@ -473,6 +483,8 @@ else
473CFLAGS += -O2 483CFLAGS += -O2
474endif 484endif
475 485
486include $(srctree)/arch/$(ARCH)/Makefile
487
476ifdef CONFIG_FRAME_POINTER 488ifdef CONFIG_FRAME_POINTER
477CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) 489CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
478else 490else
@@ -487,7 +499,8 @@ ifdef CONFIG_DEBUG_INFO
487CFLAGS += -g 499CFLAGS += -g
488endif 500endif
489 501
490include $(srctree)/arch/$(ARCH)/Makefile 502# Force gcc to behave correct even for buggy distributions
503CFLAGS += $(call cc-option, -fno-stack-protector)
491 504
492# arch Makefile may override CC so keep this after arch Makefile is included 505# arch Makefile may override CC so keep this after arch Makefile is included
493NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 506NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)