aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-10-23 01:01:49 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-10-23 01:01:49 -0400
commit3dd41424090a0ca3a660218d06afe6ff4441bad3 (patch)
tree511ef1bb1799027fc5aad574adce49120ecadd87 /Makefile
parent5c5456402d467969b217d7fdd6670f8c8600f5a8 (diff)
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
Merge commit 'v2.6.36' into wip-merge-2.6.36
Conflicts: Makefile arch/x86/include/asm/unistd_32.h arch/x86/kernel/syscall_table_32.S kernel/sched.c kernel/time/tick-sched.c Relevant API and functions changes (solved in this commit): - (API) .enqueue_task() (enqueue_task_litmus), dequeue_task() (dequeue_task_litmus), [litmus/sched_litmus.c] - (API) .select_task_rq() (select_task_rq_litmus) [litmus/sched_litmus.c] - (API) sysrq_dump_trace_buffer() and sysrq_handle_kill_rt_tasks() [litmus/sched_trace.c] - struct kfifo internal buffer name changed (buffer -> buf) [litmus/sched_trace.c] - add_wait_queue_exclusive_locked -> __add_wait_queue_tail_exclusive [litmus/fmlp.c] - syscall numbers for both x86_32 and x86_64
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile129
1 files changed, 45 insertions, 84 deletions
diff --git a/Makefile b/Makefile
index 316557df634b..8e53f47a311b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 34 3SUBLEVEL = 36
4EXTRAVERSION =-litmus2010 4EXTRAVERSION =-litmus2010
5NAME = Sheep on Meth 5NAME = Flesh-Eating Bats with Fangs
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
8# To see a list of typical targets execute "make help" 8# To see a list of typical targets execute "make help"
@@ -183,11 +183,13 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
183# CROSS_COMPILE can be set on the command line 183# CROSS_COMPILE can be set on the command line
184# make CROSS_COMPILE=ia64-linux- 184# make CROSS_COMPILE=ia64-linux-
185# Alternatively CROSS_COMPILE can be set in the environment. 185# Alternatively CROSS_COMPILE can be set in the environment.
186# A third alternative is to store a setting in .config so that plain
187# "make" in the configured kernel build directory always uses that.
186# Default value for CROSS_COMPILE is not to prefix executables 188# Default value for CROSS_COMPILE is not to prefix executables
187# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile 189# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
188export KBUILD_BUILDHOST := $(SUBARCH) 190export KBUILD_BUILDHOST := $(SUBARCH)
189ARCH ?= $(SUBARCH) 191ARCH ?= $(SUBARCH)
190CROSS_COMPILE ?= 192CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
191 193
192# Architecture as present in compile.h 194# Architecture as present in compile.h
193UTS_MACHINE := $(ARCH) 195UTS_MACHINE := $(ARCH)
@@ -329,10 +331,9 @@ CHECK = sparse
329 331
330CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 332CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
331 -Wbitwise -Wno-return-void $(CF) 333 -Wbitwise -Wno-return-void $(CF)
332MODFLAGS = -DMODULE 334CFLAGS_MODULE =
333CFLAGS_MODULE = $(MODFLAGS) 335AFLAGS_MODULE =
334AFLAGS_MODULE = $(MODFLAGS) 336LDFLAGS_MODULE =
335LDFLAGS_MODULE = -T $(srctree)/scripts/module-common.lds
336CFLAGS_KERNEL = 337CFLAGS_KERNEL =
337AFLAGS_KERNEL = 338AFLAGS_KERNEL =
338CFLAGS_GCOV = -fprofile-arcs -ftest-coverage 339CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
@@ -351,7 +352,12 @@ KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
351 -Werror-implicit-function-declaration \ 352 -Werror-implicit-function-declaration \
352 -Wno-format-security \ 353 -Wno-format-security \
353 -fno-delete-null-pointer-checks 354 -fno-delete-null-pointer-checks
355KBUILD_AFLAGS_KERNEL :=
356KBUILD_CFLAGS_KERNEL :=
354KBUILD_AFLAGS := -D__ASSEMBLY__ 357KBUILD_AFLAGS := -D__ASSEMBLY__
358KBUILD_AFLAGS_MODULE := -DMODULE
359KBUILD_CFLAGS_MODULE := -DMODULE
360KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
355 361
356# Read KERNELRELEASE from include/config/kernel.release (if it exists) 362# Read KERNELRELEASE from include/config/kernel.release (if it exists)
357KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null) 363KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
@@ -366,6 +372,8 @@ export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
366export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 372export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
367export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV 373export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
368export 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
369 377
370# When compiling out-of-tree modules, put MODVERDIR in the module 378# When compiling out-of-tree modules, put MODVERDIR in the module
371# tree rather than in the kernel tree. The kernel tree might 379# tree rather than in the kernel tree. The kernel tree might
@@ -409,9 +417,9 @@ endif
409# 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).
410 418
411no-dot-config-targets := clean mrproper distclean \ 419no-dot-config-targets := clean mrproper distclean \
412 cscope TAGS tags help %docs check% \ 420 cscope TAGS tags help %docs check% coccicheck \
413 include/linux/version.h headers_% \ 421 include/linux/version.h headers_% \
414 kernelrelease kernelversion 422 kernelversion %src-pkg
415 423
416config-targets := 0 424config-targets := 0
417mixed-targets := 0 425mixed-targets := 0
@@ -523,7 +531,7 @@ endif # $(dot-config)
523# 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
524# command line. 532# command line.
525# 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
526# Defaults vmlinux but it is usually overridden in the arch makefile 534# Defaults to vmlinux, but the arch makefile usually adds further targets
527all: vmlinux 535all: vmlinux
528 536
529ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE 537ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
@@ -554,6 +562,10 @@ KBUILD_CFLAGS += -g
554KBUILD_AFLAGS += -gdwarf-2 562KBUILD_AFLAGS += -gdwarf-2
555endif 563endif
556 564
565ifdef CONFIG_DEBUG_INFO_REDUCED
566KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly)
567endif
568
557ifdef CONFIG_FUNCTION_TRACER 569ifdef CONFIG_FUNCTION_TRACER
558KBUILD_CFLAGS += -pg 570KBUILD_CFLAGS += -pg
559endif 571endif
@@ -576,9 +588,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)
576# disable invalid "can't wrap" optimizations for signed / pointers 588# disable invalid "can't wrap" optimizations for signed / pointers
577KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow) 589KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
578 590
579# revert to pre-gcc-4.4 behaviour of .eh_frame
580KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)
581
582# conserve stack if available 591# conserve stack if available
583KBUILD_CFLAGS += $(call cc-option,-fconserve-stack) 592KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
584 593
@@ -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)
@@ -882,73 +891,11 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
882PHONY += $(vmlinux-dirs) 891PHONY += $(vmlinux-dirs)
883$(vmlinux-dirs): prepare scripts 892$(vmlinux-dirs): prepare scripts
884 $(Q)$(MAKE) $(build)=$@ 893 $(Q)$(MAKE) $(build)=$@
885ifdef CONFIG_MODULES
886 $(Q)$(MAKE) $(modbuiltin)=$@
887endif
888
889# Build the kernel release string
890#
891# The KERNELRELEASE value built here is stored in the file
892# include/config/kernel.release, and is used when executing several
893# make targets, such as "make install" or "make modules_install."
894#
895# The eventual kernel release string consists of the following fields,
896# shown in a hierarchical format to show how smaller parts are concatenated
897# to form the larger and final value, with values coming from places like
898# the Makefile, kernel config options, make command line options and/or
899# SCM tag information.
900#
901# $(KERNELVERSION)
902# $(VERSION) eg, 2
903# $(PATCHLEVEL) eg, 6
904# $(SUBLEVEL) eg, 18
905# $(EXTRAVERSION) eg, -rc6
906# $(localver-full)
907# $(localver)
908# localversion* (files without backups, containing '~')
909# $(CONFIG_LOCALVERSION) (from kernel config setting)
910# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set)
911# ./scripts/setlocalversion (SCM tag, if one exists)
912# $(LOCALVERSION) (from make command line if provided)
913#
914# Note how the final $(localver-auto) string is included *only* if the
915# kernel config option CONFIG_LOCALVERSION_AUTO is selected. Also, at the
916# moment, only git is supported but other SCMs can edit the script
917# scripts/setlocalversion and add the appropriate checks as needed.
918
919pattern = ".*/localversion[^~]*"
920string = $(shell cat /dev/null \
921 `find $(objtree) $(srctree) -maxdepth 1 -regex $(pattern) | sort -u`)
922
923localver = $(subst $(space),, $(string) \
924 $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
925
926# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
927# and if the SCM is know a tag from the SCM is appended.
928# The appended tag is determined by the SCM used.
929#
930# .scmversion is used when generating rpm packages so we do not loose
931# the version information from the SCM when we do the build of the kernel
932# from the copied source
933ifdef CONFIG_LOCALVERSION_AUTO
934
935ifeq ($(wildcard .scmversion),)
936 _localver-auto = $(shell $(CONFIG_SHELL) \
937 $(srctree)/scripts/setlocalversion $(srctree))
938else
939 _localver-auto = $(shell cat .scmversion 2> /dev/null)
940endif
941
942 localver-auto = $(LOCALVERSION)$(_localver-auto)
943endif
944
945localver-full = $(localver)$(localver-auto)
946 894
947# Store (new) KERNELRELASE string in include/config/kernel.release 895# Store (new) KERNELRELASE string in include/config/kernel.release
948kernelrelease = $(KERNELVERSION)$(localver-full)
949include/config/kernel.release: include/config/auto.conf FORCE 896include/config/kernel.release: include/config/auto.conf FORCE
950 $(Q)rm -f $@ 897 $(Q)rm -f $@
951 $(Q)echo $(kernelrelease) > $@ 898 $(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
952 899
953 900
954# Things we need to do before we recursively start building the kernel 901# Things we need to do before we recursively start building the kernel
@@ -1087,13 +1034,18 @@ all: modules
1087# using awk while concatenating to the final file. 1034# using awk while concatenating to the final file.
1088 1035
1089PHONY += modules 1036PHONY += modules
1090modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) 1037modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
1091 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order 1038 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
1092 $(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.builtin) > $(objtree)/modules.builtin
1093 @$(kecho) ' Building modules, stage 2.'; 1039 @$(kecho) ' Building modules, stage 2.';
1094 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost 1040 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
1095 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild 1041 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
1096 1042
1043modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
1044 $(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
1045
1046%/modules.builtin: include/config/auto.conf
1047 $(Q)$(MAKE) $(modbuiltin)=$*
1048
1097 1049
1098# Target to prepare building external modules 1050# Target to prepare building external modules
1099PHONY += modules_prepare 1051PHONY += modules_prepare
@@ -1215,6 +1167,8 @@ distclean: mrproper
1215# rpm target kept for backward compatibility 1167# rpm target kept for backward compatibility
1216package-dir := $(srctree)/scripts/package 1168package-dir := $(srctree)/scripts/package
1217 1169
1170%src-pkg: FORCE
1171 $(Q)$(MAKE) $(build)=$(package-dir) $@
1218%pkg: include/config/kernel.release FORCE 1172%pkg: include/config/kernel.release FORCE
1219 $(Q)$(MAKE) $(build)=$(package-dir) $@ 1173 $(Q)$(MAKE) $(build)=$(package-dir) $@
1220rpm: include/config/kernel.release FORCE 1174rpm: include/config/kernel.release FORCE
@@ -1247,7 +1201,9 @@ help:
1247 @echo ' firmware_install- Install all firmware to INSTALL_FW_PATH' 1201 @echo ' firmware_install- Install all firmware to INSTALL_FW_PATH'
1248 @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)' 1202 @echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)'
1249 @echo ' dir/ - Build all files in dir and below' 1203 @echo ' dir/ - Build all files in dir and below'
1250 @echo ' dir/file.[ois] - Build specified target only' 1204 @echo ' dir/file.[oisS] - Build specified target only'
1205 @echo ' dir/file.lst - Build specified mixed source/assembly target only'
1206 @echo ' (requires a recent binutils and recent build (System.map))'
1251 @echo ' dir/file.ko - Build module including final link' 1207 @echo ' dir/file.ko - Build module including final link'
1252 @echo ' modules_prepare - Set up for building external modules' 1208 @echo ' modules_prepare - Set up for building external modules'
1253 @echo ' tags/TAGS - Generate tags file for editors' 1209 @echo ' tags/TAGS - Generate tags file for editors'
@@ -1264,8 +1220,9 @@ help:
1264 @echo ' includecheck - Check for duplicate included header files' 1220 @echo ' includecheck - Check for duplicate included header files'
1265 @echo ' export_report - List the usages of all exported symbols' 1221 @echo ' export_report - List the usages of all exported symbols'
1266 @echo ' headers_check - Sanity check on exported headers' 1222 @echo ' headers_check - Sanity check on exported headers'
1267 @echo ' headerdep - Detect inclusion cycles in headers'; \ 1223 @echo ' headerdep - Detect inclusion cycles in headers'
1268 echo '' 1224 @$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
1225 @echo ''
1269 @echo 'Kernel packaging:' 1226 @echo 'Kernel packaging:'
1270 @$(MAKE) $(build)=$(package-dir) help 1227 @$(MAKE) $(build)=$(package-dir) help
1271 @echo '' 1228 @echo ''
@@ -1424,6 +1381,9 @@ versioncheck:
1424 -name '*.[hcS]' -type f -print | sort \ 1381 -name '*.[hcS]' -type f -print | sort \
1425 | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl 1382 | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
1426 1383
1384coccicheck:
1385 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
1386
1427namespacecheck: 1387namespacecheck:
1428 $(PERL) $(srctree)/scripts/namespace.pl 1388 $(PERL) $(srctree)/scripts/namespace.pl
1429 1389
@@ -1449,8 +1409,8 @@ checkstack:
1449 $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH) 1409 $(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
1450 1410
1451kernelrelease: 1411kernelrelease:
1452 $(if $(wildcard include/config/kernel.release), $(Q)echo $(KERNELRELEASE), \ 1412 @echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
1453 $(error kernelrelease not valid - run 'make prepare' to update it)) 1413
1454kernelversion: 1414kernelversion:
1455 @echo $(KERNELVERSION) 1415 @echo $(KERNELVERSION)
1456 1416
@@ -1527,6 +1487,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
1527 $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*) 1487 $(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
1528 1488
1529a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \ 1489a_flags = -Wp,-MD,$(depfile) $(KBUILD_AFLAGS) $(AFLAGS_KERNEL) \
1490 $(KBUILD_AFLAGS_KERNEL) \
1530 $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \ 1491 $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(KBUILD_CPPFLAGS) \
1531 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o) 1492 $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(basetarget).o)
1532 1493