diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 34 |
1 files changed, 23 insertions, 11 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 18 | 3 | SUBLEVEL = 18 |
4 | EXTRAVERSION = -rc4 | 4 | EXTRAVERSION = -rc5 |
5 | NAME=Crazed Snow-Weasel | 5 | NAME=Crazed Snow-Weasel |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -309,9 +309,6 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | |||
309 | 309 | ||
310 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 310 | CFLAGS := -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 | ||
313 | CFLAGS += $(call cc-option, -fno-stack-protector) | ||
314 | |||
315 | AFLAGS := -D__ASSEMBLY__ | 312 | AFLAGS := -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/ | |||
436 | endif # KBUILD_EXTMOD | 433 | endif # KBUILD_EXTMOD |
437 | 434 | ||
438 | ifeq ($(dot-config),1) | 435 | ifeq ($(dot-config),1) |
439 | # In this section, we need .config | 436 | # Read in config |
437 | -include include/config/auto.conf | ||
440 | 438 | ||
439 | ifeq ($(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 |
453 | include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd | 451 | include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd |
454 | ifeq ($(KBUILD_EXTMOD),) | ||
455 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig | 452 | $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig |
456 | else | 453 | else |
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 |
458 | endif | 455 | # but do not care if they are up-to-date. Use auto.conf to trigger the test |
456 | PHONY += include/config/auto.conf | ||
457 | |||
458 | include/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 | |||
467 | endif # KBUILD_EXTMOD | ||
459 | 468 | ||
460 | else | 469 | else |
461 | # Dummy target needed, because used as prerequisite | 470 | # Dummy target needed, because used as prerequisite |
462 | include/config/auto.conf: ; | 471 | include/config/auto.conf: ; |
463 | endif | 472 | endif # $(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 | |||
474 | CFLAGS += -O2 | 483 | CFLAGS += -O2 |
475 | endif | 484 | endif |
476 | 485 | ||
486 | include $(srctree)/arch/$(ARCH)/Makefile | ||
487 | |||
477 | ifdef CONFIG_FRAME_POINTER | 488 | ifdef CONFIG_FRAME_POINTER |
478 | CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) | 489 | CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) |
479 | else | 490 | else |
@@ -488,7 +499,8 @@ ifdef CONFIG_DEBUG_INFO | |||
488 | CFLAGS += -g | 499 | CFLAGS += -g |
489 | endif | 500 | endif |
490 | 501 | ||
491 | include $(srctree)/arch/$(ARCH)/Makefile | 502 | # Force gcc to behave correct even for buggy distributions |
503 | CFLAGS += $(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 |
494 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 506 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |