aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-08-20 07:53:08 -0400
committerMichal Marek <mmarek@suse.cz>2010-08-20 07:53:08 -0400
commite981b060767b3c4ac9393ad8d2558d648e35dfcb (patch)
tree9c05eaec3072be3645dda61d35085d152b9d5954 /Makefile
parent3c955b407a084810f57260d61548cc92c14bc627 (diff)
parentda5cabf80e2433131bf0ed8993abc0f7ea618c73 (diff)
Merge commit 'v2.6.36-rc1' into kbuild/rc-fixes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile48
1 files changed, 32 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 141da26fda4b..f3bdff8c8d78 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 35 3SUBLEVEL = 36
4EXTRAVERSION = 4EXTRAVERSION = -rc1
5NAME = Sheep on Meth 5NAME = 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
190export KBUILD_BUILDHOST := $(SUBARCH) 190export KBUILD_BUILDHOST := $(SUBARCH)
191ARCH ?= $(SUBARCH) 191ARCH ?= $(SUBARCH)
192CROSS_COMPILE ?=
193CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%) 192CROSS_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
333CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 332CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
334 -Wbitwise -Wno-return-void $(CF) 333 -Wbitwise -Wno-return-void $(CF)
335MODFLAGS = -DMODULE 334CFLAGS_MODULE =
336CFLAGS_MODULE = $(MODFLAGS) 335AFLAGS_MODULE =
337AFLAGS_MODULE = $(MODFLAGS) 336LDFLAGS_MODULE =
338LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds
339CFLAGS_KERNEL = 337CFLAGS_KERNEL =
340AFLAGS_KERNEL = 338AFLAGS_KERNEL =
341CFLAGS_GCOV = -fprofile-arcs -ftest-coverage 339CFLAGS_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
355KBUILD_AFLAGS_KERNEL :=
356KBUILD_CFLAGS_KERNEL :=
357KBUILD_AFLAGS := -D__ASSEMBLY__ 357KBUILD_AFLAGS := -D__ASSEMBLY__
358KBUILD_AFLAGS_MODULE := -DMODULE
359KBUILD_CFLAGS_MODULE := -DMODULE
360KBUILD_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)
360KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) 363KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@@ -369,6 +372,8 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
369export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 372export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
370export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV 373export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
371export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE 374export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
375export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
376export 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
414no-dot-config-targets := clean mrproper distclean \ 419no-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
419config-targets := 0 424config-targets := 0
420mixed-targets := 0 425mixed-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
530all: vmlinux 535all: vmlinux
531 536
532ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 537ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
@@ -557,6 +562,10 @@ KBUILD_CFLAGS += -g
557KBUILD_AFLAGS += -gdwarf-2 562KBUILD_AFLAGS += -gdwarf-2
558endif 563endif
559 564
565ifdef CONFIG_DEBUG_INFO_REDUCED
566KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly)
567endif
568
560ifdef CONFIG_FUNCTION_TRACER 569ifdef CONFIG_FUNCTION_TRACER
561KBUILD_CFLAGS += -pg 570KBUILD_CFLAGS += -pg
562endif 571endif
@@ -603,7 +612,7 @@ endif
603# Use --build-id when available. 612# Use --build-id when available.
604LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ 613LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
605 $(call cc-ldoption, -Wl$(comma)--build-id,)) 614 $(call cc-ldoption, -Wl$(comma)--build-id,))
606LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) 615KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
607LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) 616LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
608 617
609ifeq ($(CONFIG_STRIP_ASM_SYMS),y) 618ifeq ($(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
1159package-dir := $(srctree)/scripts/package 1168package-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) $@
1163rpm: include/config/kernel.release FORCE 1174rpm: 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
1384coccicheck:
1385 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
1386
1372namespacecheck: 1387namespacecheck:
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
1396kernelrelease: 1411kernelrelease: 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
1399kernelversion: 1414kernelversion:
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
1474a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ 1489a_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