diff options
author | Michal Marek <mmarek@suse.cz> | 2010-08-20 07:53:08 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-20 07:53:08 -0400 |
commit | e981b060767b3c4ac9393ad8d2558d648e35dfcb (patch) | |
tree | 9c05eaec3072be3645dda61d35085d152b9d5954 /Makefile | |
parent | 3c955b407a084810f57260d61548cc92c14bc627 (diff) | |
parent | da5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff) |
Merge commit 'v2.6.36-rc1' into kbuild/rc-fixes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 48 |
1 files changed, 32 insertions, 16 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 35 | 3 | SUBLEVEL = 36 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = -rc1 |
5 | NAME = Sheep on Meth | 5 | NAME = Sheep on Meth |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
@@ -189,7 +189,6 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ | |||
189 | # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile | 189 | # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile |
190 | export KBUILD_BUILDHOST := $(SUBARCH) | 190 | export KBUILD_BUILDHOST := $(SUBARCH) |
191 | ARCH ?= $(SUBARCH) | 191 | ARCH ?= $(SUBARCH) |
192 | CROSS_COMPILE ?= | ||
193 | CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) | 192 | CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) |
194 | 193 | ||
195 | # Architecture as present in compile.h | 194 | # Architecture as present in compile.h |
@@ -332,10 +331,9 @@ CHECK = sparse | |||
332 | 331 | ||
333 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 332 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
334 | -Wbitwise -Wno-return-void $(CF) | 333 | -Wbitwise -Wno-return-void $(CF) |
335 | MODFLAGS = -DMODULE | 334 | CFLAGS_MODULE = |
336 | CFLAGS_MODULE = $(MODFLAGS) | 335 | AFLAGS_MODULE = |
337 | AFLAGS_MODULE = $(MODFLAGS) | 336 | LDFLAGS_MODULE = |
338 | LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds | ||
339 | CFLAGS_KERNEL = | 337 | CFLAGS_KERNEL = |
340 | AFLAGS_KERNEL = | 338 | AFLAGS_KERNEL = |
341 | CFLAGS_GCOV = -fprofile-arcs -ftest-coverage | 339 | CFLAGS_GCOV = -fprofile-arcs -ftest-coverage |
@@ -354,7 +352,12 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | |||
354 | -Werror-implicit-function-declaration \ | 352 | -Werror-implicit-function-declaration \ |
355 | -Wno-format-security \ | 353 | -Wno-format-security \ |
356 | -fno-delete-null-pointer-checks | 354 | -fno-delete-null-pointer-checks |
355 | KBUILD_AFLAGS_KERNEL := | ||
356 | KBUILD_CFLAGS_KERNEL := | ||
357 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 357 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
358 | KBUILD_AFLAGS_MODULE := -DMODULE | ||
359 | KBUILD_CFLAGS_MODULE := -DMODULE | ||
360 | KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds | ||
358 | 361 | ||
359 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) | 362 | # Read KERNELRELEASE from include/config/kernel.release (if it exists) |
360 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) | 363 | KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) |
@@ -369,6 +372,8 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | |||
369 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 372 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
370 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV | 373 | export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV |
371 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE | 374 | export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE |
375 | export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE | ||
376 | export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL | ||
372 | 377 | ||
373 | # When compiling out-of-tree modules, put MODVERDIR in the module | 378 | # When compiling out-of-tree modules, put MODVERDIR in the module |
374 | # tree rather than in the kernel tree. The kernel tree might | 379 | # tree rather than in the kernel tree. The kernel tree might |
@@ -412,9 +417,9 @@ endif | |||
412 | # of make so .config is not included in this case either (for *config). | 417 | # of make so .config is not included in this case either (for *config). |
413 | 418 | ||
414 | no-dot-config-targets := clean mrproper distclean \ | 419 | no-dot-config-targets := clean mrproper distclean \ |
415 | cscope TAGS tags help %docs check% \ | 420 | cscope TAGS tags help %docs check% coccicheck \ |
416 | include/linux/version.h headers_% \ | 421 | include/linux/version.h headers_% \ |
417 | kernelrelease kernelversion | 422 | kernelversion %src-pkg |
418 | 423 | ||
419 | config-targets := 0 | 424 | config-targets := 0 |
420 | mixed-targets := 0 | 425 | mixed-targets := 0 |
@@ -526,7 +531,7 @@ endif # $(dot-config) | |||
526 | # The all: target is the default when no target is given on the | 531 | # The all: target is the default when no target is given on the |
527 | # command line. | 532 | # command line. |
528 | # This allow a user to issue only 'make' to build a kernel including modules | 533 | # This allow a user to issue only 'make' to build a kernel including modules |
529 | # Defaults vmlinux but it is usually overridden in the arch makefile | 534 | # Defaults to vmlinux, but the arch makefile usually adds further targets |
530 | all: vmlinux | 535 | all: vmlinux |
531 | 536 | ||
532 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | 537 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE |
@@ -557,6 +562,10 @@ KBUILD_CFLAGS += -g | |||
557 | KBUILD_AFLAGS += -gdwarf-2 | 562 | KBUILD_AFLAGS += -gdwarf-2 |
558 | endif | 563 | endif |
559 | 564 | ||
565 | ifdef CONFIG_DEBUG_INFO_REDUCED | ||
566 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) | ||
567 | endif | ||
568 | |||
560 | ifdef CONFIG_FUNCTION_TRACER | 569 | ifdef CONFIG_FUNCTION_TRACER |
561 | KBUILD_CFLAGS += -pg | 570 | KBUILD_CFLAGS += -pg |
562 | endif | 571 | endif |
@@ -603,7 +612,7 @@ endif | |||
603 | # Use --build-id when available. | 612 | # Use --build-id when available. |
604 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | 613 | LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ |
605 | $(call cc-ldoption, -Wl$(comma)--build-id,)) | 614 | $(call cc-ldoption, -Wl$(comma)--build-id,)) |
606 | LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) | 615 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) |
607 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) | 616 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) |
608 | 617 | ||
609 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) | 618 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) |
@@ -1158,6 +1167,8 @@ distclean: mrproper | |||
1158 | # rpm target kept for backward compatibility | 1167 | # rpm target kept for backward compatibility |
1159 | package-dir := $(srctree)/scripts/package | 1168 | package-dir := $(srctree)/scripts/package |
1160 | 1169 | ||
1170 | %src-pkg: FORCE | ||
1171 | $(Q)$(MAKE) $(build)=$(package-dir) $@ | ||
1161 | %pkg: include/config/kernel.release FORCE | 1172 | %pkg: include/config/kernel.release FORCE |
1162 | $(Q)$(MAKE) $(build)=$(package-dir) $@ | 1173 | $(Q)$(MAKE) $(build)=$(package-dir) $@ |
1163 | rpm: include/config/kernel.release FORCE | 1174 | rpm: include/config/kernel.release FORCE |
@@ -1209,8 +1220,9 @@ help: | |||
1209 | @echo ' includecheck - Check for duplicate included header files' | 1220 | @echo ' includecheck - Check for duplicate included header files' |
1210 | @echo ' export_report - List the usages of all exported symbols' | 1221 | @echo ' export_report - List the usages of all exported symbols' |
1211 | @echo ' headers_check - Sanity check on exported headers' | 1222 | @echo ' headers_check - Sanity check on exported headers' |
1212 | @echo ' headerdep - Detect inclusion cycles in headers'; \ | 1223 | @echo ' headerdep - Detect inclusion cycles in headers' |
1213 | echo '' | 1224 | @$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help |
1225 | @echo '' | ||
1214 | @echo 'Kernel packaging:' | 1226 | @echo 'Kernel packaging:' |
1215 | @$(MAKE) $(build)=$(package-dir) help | 1227 | @$(MAKE) $(build)=$(package-dir) help |
1216 | @echo '' | 1228 | @echo '' |
@@ -1369,6 +1381,9 @@ versioncheck: | |||
1369 | -name '*.[hcS]' -type f -print | sort \ | 1381 | -name '*.[hcS]' -type f -print | sort \ |
1370 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl | 1382 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl |
1371 | 1383 | ||
1384 | coccicheck: | ||
1385 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@ | ||
1386 | |||
1372 | namespacecheck: | 1387 | namespacecheck: |
1373 | $(PERL) $(srctree)/scripts/namespace.pl | 1388 | $(PERL) $(srctree)/scripts/namespace.pl |
1374 | 1389 | ||
@@ -1393,9 +1408,9 @@ checkstack: | |||
1393 | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ | 1408 | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ |
1394 | $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) | 1409 | $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) |
1395 | 1410 | ||
1396 | kernelrelease: | 1411 | kernelrelease: include/config/kernel.release |
1397 | $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ | 1412 | @echo $(KERNELRELEASE) |
1398 | $(error kernelrelease not valid - run 'make prepare' to update it)) | 1413 | |
1399 | kernelversion: | 1414 | kernelversion: |
1400 | @echo $(KERNELVERSION) | 1415 | @echo $(KERNELVERSION) |
1401 | 1416 | ||
@@ -1472,6 +1487,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \ | |||
1472 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) | 1487 | $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) |
1473 | 1488 | ||
1474 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ | 1489 | a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ |
1490 | $(KBUILD_AFLAGS_KERNEL) \ | ||
1475 | $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ | 1491 | $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ |
1476 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) | 1492 | $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) |
1477 | 1493 | ||