aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 23 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c2f78a5a5493..33559b566449 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 18 3SUBLEVEL = 18
4EXTRAVERSION = -rc4 4EXTRAVERSION = -rc5
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)
314
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)
@@ -436,12 +433,13 @@ core-y := usr/
436endif # KBUILD_EXTMOD 433endif # KBUILD_EXTMOD
437 434
438ifeq ($(dot-config),1) 435ifeq ($(dot-config),1)
439# In this section, we need .config 436# Read in config
437-include include/config/auto.conf
440 438
439ifeq ($(KBUILD_EXTMOD),)
441# Read in dependencies to all Kconfig* files, make sure to run 440# Read in dependencies to all Kconfig* files, make sure to run
442# oldconfig if changes are detected. 441# oldconfig if changes are detected.
443-include include/config/auto.conf.cmd 442-include include/config/auto.conf.cmd
444-include include/config/auto.conf
445 443
446# 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
447$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; 445$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
@@ -451,16 +449,27 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
451# 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
452# 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
453include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd 451include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
454ifeq ($(KBUILD_EXTMOD),)
455 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig 452 $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
456else 453else
457 $(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
458endif 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
459 468
460else 469else
461# Dummy target needed, because used as prerequisite 470# Dummy target needed, because used as prerequisite
462include/config/auto.conf: ; 471include/config/auto.conf: ;
463endif 472endif # $(dot-config)
464 473
465# 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
466# command line. 475# command line.
@@ -474,6 +483,8 @@ else
474CFLAGS += -O2 483CFLAGS += -O2
475endif 484endif
476 485
486include $(srctree)/arch/$(ARCH)/Makefile
487
477ifdef CONFIG_FRAME_POINTER 488ifdef CONFIG_FRAME_POINTER
478CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) 489CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,)
479else 490else
@@ -488,7 +499,8 @@ ifdef CONFIG_DEBUG_INFO
488CFLAGS += -g 499CFLAGS += -g
489endif 500endif
490 501
491include $(srctree)/arch/$(ARCH)/Makefile 502# Force gcc to behave correct even for buggy distributions
503CFLAGS += $(call cc-option, -fno-stack-protector)
492 504
493# 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
494NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) 506NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)