aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:21:33 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:21:33 -0500
commitab396e91bfe953db26fa1083d9c3e7a4fbe0334a (patch)
tree81db9e5f919b84dcb4284ca8cdf675e13716c191
parent9979ead5d1eb23191a00453559927c5abf9087e2 (diff)
parent4f0210b9c4889eede9f8f379f93570c01998ccb9 (diff)
Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Fix up some trivial conflicts in {i386|ia64}/Makefile
-rw-r--r--Documentation/kbuild/makefiles.txt4
-rw-r--r--Kbuild5
-rw-r--r--Makefile97
-rw-r--r--arch/frv/boot/Makefile4
-rw-r--r--arch/i386/Makefile10
-rw-r--r--arch/i386/boot/Makefile2
-rw-r--r--arch/i386/boot/install.sh14
-rw-r--r--arch/ia64/Makefile3
-rw-r--r--arch/powerpc/Makefile6
-rw-r--r--arch/ppc/Makefile3
-rw-r--r--arch/x86_64/Makefile5
-rw-r--r--arch/x86_64/boot/Makefile2
-rw-r--r--arch/x86_64/boot/install.sh40
-rw-r--r--fs/xfs/Kbuild6
-rw-r--r--scripts/Kbuild.include13
-rw-r--r--scripts/Makefile.build4
-rw-r--r--scripts/kconfig/lxdialog/Makefile48
-rw-r--r--scripts/kconfig/lxdialog/check-lxdialog.sh67
-rw-r--r--scripts/mod/file2alias.c2
-rw-r--r--scripts/reference_discarded.pl6
-rw-r--r--scripts/setlocalversion2
21 files changed, 195 insertions, 148 deletions
diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt
index d802ce88bed..443230b43e0 100644
--- a/Documentation/kbuild/makefiles.txt
+++ b/Documentation/kbuild/makefiles.txt
@@ -1033,9 +1033,9 @@ When kbuild executes the following steps are followed (roughly):
1033 1033
1034 Example: 1034 Example:
1035 #arch/i386/Makefile 1035 #arch/i386/Makefile
1036 GCC_VERSION := $(call cc-version)
1037 cflags-y += $(shell \ 1036 cflags-y += $(shell \
1038 if [ $(GCC_VERSION) -ge 0300 ] ; then echo "-mregparm=3"; fi ;) 1037 if [ $(call cc-version) -ge 0300 ] ; then \
1038 echo "-mregparm=3"; fi ;)
1039 1039
1040 In the above example -mregparm=3 is only used for gcc version greater 1040 In the above example -mregparm=3 is only used for gcc version greater
1041 than or equal to gcc 3.0. 1041 than or equal to gcc 3.0.
diff --git a/Kbuild b/Kbuild
index 79003918f37..95d6a00bace 100644
--- a/Kbuild
+++ b/Kbuild
@@ -22,8 +22,6 @@ sed-$(CONFIG_MIPS) := "/^@@@/s///p"
22 22
23quiet_cmd_offsets = GEN $@ 23quiet_cmd_offsets = GEN $@
24define cmd_offsets 24define cmd_offsets
25 mkdir -p $(dir $@); \
26 cat $< | \
27 (set -e; \ 25 (set -e; \
28 echo "#ifndef __ASM_OFFSETS_H__"; \ 26 echo "#ifndef __ASM_OFFSETS_H__"; \
29 echo "#define __ASM_OFFSETS_H__"; \ 27 echo "#define __ASM_OFFSETS_H__"; \
@@ -34,7 +32,7 @@ define cmd_offsets
34 echo " *"; \ 32 echo " *"; \
35 echo " */"; \ 33 echo " */"; \
36 echo ""; \ 34 echo ""; \
37 sed -ne $(sed-y); \ 35 sed -ne $(sed-y) $<; \
38 echo ""; \ 36 echo ""; \
39 echo "#endif" ) > $@ 37 echo "#endif" ) > $@
40endef 38endef
@@ -45,5 +43,6 @@ arch/$(ARCH)/kernel/asm-offsets.s: arch/$(ARCH)/kernel/asm-offsets.c FORCE
45 $(call if_changed_dep,cc_s_c) 43 $(call if_changed_dep,cc_s_c)
46 44
47$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild 45$(obj)/$(offsets-file): arch/$(ARCH)/kernel/asm-offsets.s Kbuild
46 $(Q)mkdir -p $(dir $@)
48 $(call cmd,offsets) 47 $(call cmd,offsets)
49 48
diff --git a/Makefile b/Makefile
index fb497ea8bc7..deedaf79cdc 100644
--- a/Makefile
+++ b/Makefile
@@ -141,24 +141,6 @@ VPATH := $(srctree)
141 141
142export srctree objtree VPATH TOPDIR 142export srctree objtree VPATH TOPDIR
143 143
144nullstring :=
145space := $(nullstring) # end of line
146
147# Take the contents of any files called localversion* and the config
148# variable CONFIG_LOCALVERSION and append them to KERNELRELEASE. Be
149# careful not to include files twice if building in the source
150# directory. LOCALVERSION from the command line override all of this
151
152localver := $(objtree)/localversion* $(srctree)/localversion*
153localver := $(sort $(wildcard $(localver)))
154# skip backup files (containing '~')
155localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f)))
156
157LOCALVERSION = $(subst $(space),, \
158 $(shell cat /dev/null $(localver)) \
159 $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
160
161KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
162 144
163# SUBARCH tells the usermode build what the underlying arch is. That is set 145# SUBARCH tells the usermode build what the underlying arch is. That is set
164# first, and if a usermode build is happening, the "ARCH=um" on the command 146# first, and if a usermode build is happening, the "ARCH=um" on the command
@@ -353,7 +335,10 @@ CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
353 -ffreestanding 335 -ffreestanding
354AFLAGS := -D__ASSEMBLY__ 336AFLAGS := -D__ASSEMBLY__
355 337
356export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \ 338# Read KERNELRELEASE from .kernelrelease (if it exists)
339KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
340
341export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \
357 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ 342 ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
358 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ 343 CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
359 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 344 HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
@@ -551,26 +536,6 @@ export KBUILD_IMAGE ?= vmlinux
551# images. Default is /boot, but you can set it to other values 536# images. Default is /boot, but you can set it to other values
552export INSTALL_PATH ?= /boot 537export INSTALL_PATH ?= /boot
553 538
554# If CONFIG_LOCALVERSION_AUTO is set, we automatically perform some tests
555# and try to determine if the current source tree is a release tree, of any sort,
556# or if is a pure development tree.
557#
558# A 'release tree' is any tree with a git TAG associated
559# with it. The primary goal of this is to make it safe for a native
560# git/CVS/SVN user to build a release tree (i.e, 2.6.9) and also to
561# continue developing against the current Linus tree, without having the Linus
562# tree overwrite the 2.6.9 tree when installed.
563#
564# Currently, only git is supported.
565# Other SCMs can edit scripts/setlocalversion and add the appropriate
566# checks as needed.
567
568
569ifdef CONFIG_LOCALVERSION_AUTO
570 localversion-auto := $(shell $(PERL) $(srctree)/scripts/setlocalversion $(srctree))
571 LOCALVERSION := $(LOCALVERSION)$(localversion-auto)
572endif
573
574# 539#
575# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory 540# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
576# relocations required by build roots. This is not defined in the 541# relocations required by build roots. This is not defined in the
@@ -782,6 +747,50 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ;
782$(vmlinux-dirs): prepare scripts 747$(vmlinux-dirs): prepare scripts
783 $(Q)$(MAKE) $(build)=$@ 748 $(Q)$(MAKE) $(build)=$@
784 749
750# Build the kernel release string
751# The KERNELRELEASE is stored in a file named .kernelrelease
752# to be used when executing for example make install or make modules_install
753#
754# Take the contents of any files called localversion* and the config
755# variable CONFIG_LOCALVERSION and append them to KERNELRELEASE.
756# LOCALVERSION from the command line override all of this
757
758nullstring :=
759space := $(nullstring) # end of line
760
761___localver = $(objtree)/localversion* $(srctree)/localversion*
762__localver = $(sort $(wildcard $(___localver)))
763# skip backup files (containing '~')
764_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
765
766localver = $(subst $(space),, \
767 $(shell cat /dev/null $(_localver)) \
768 $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
769
770# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
771# and if the SCM is know a tag from the SCM is appended.
772# The appended tag is determinded by the SCM used.
773#
774# Currently, only git is supported.
775# Other SCMs can edit scripts/setlocalversion and add the appropriate
776# checks as needed.
777ifdef CONFIG_LOCALVERSION_AUTO
778 _localver-auto = $(shell $(CONFIG_SHELL) \
779 $(srctree)/scripts/setlocalversion $(srctree))
780 localver-auto = $(LOCALVERSION)$(_localver-auto)
781endif
782
783localver-full = $(localver)$(localver-auto)
784
785# Store (new) KERNELRELASE string in .kernelrelease
786kernelrelease = \
787 $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full)
788.kernelrelease: FORCE
789 $(Q)rm -f .kernelrelease
790 $(Q)echo $(kernelrelease) > .kernelrelease
791 $(Q)echo " Building kernel $(kernelrelease)"
792
793
785# Things we need to do before we recursively start building the kernel 794# Things we need to do before we recursively start building the kernel
786# or the modules are listed in "prepare". 795# or the modules are listed in "prepare".
787# A multi level approach is used. prepareN is processed before prepareN-1. 796# A multi level approach is used. prepareN is processed before prepareN-1.
@@ -798,8 +807,7 @@ $(vmlinux-dirs): prepare scripts
798# and if so do: 807# and if so do:
799# 1) Check that make has not been executed in the kernel src $(srctree) 808# 1) Check that make has not been executed in the kernel src $(srctree)
800# 2) Create the include2 directory, used for the second asm symlink 809# 2) Create the include2 directory, used for the second asm symlink
801 810prepare3: .kernelrelease
802prepare3:
803ifneq ($(KBUILD_SRC),) 811ifneq ($(KBUILD_SRC),)
804 @echo ' Using $(srctree) as source for kernel' 812 @echo ' Using $(srctree) as source for kernel'
805 $(Q)if [ -f $(srctree)/.config ]; then \ 813 $(Q)if [ -f $(srctree)/.config ]; then \
@@ -984,9 +992,9 @@ CLEAN_FILES += vmlinux System.map \
984 992
985# Directories & files removed with 'make mrproper' 993# Directories & files removed with 'make mrproper'
986MRPROPER_DIRS += include/config include2 994MRPROPER_DIRS += include/config include2
987MRPROPER_FILES += .config .config.old include/asm .version \ 995MRPROPER_FILES += .config .config.old include/asm .version .old_version \
988 include/linux/autoconf.h include/linux/version.h \ 996 include/linux/autoconf.h include/linux/version.h \
989 Module.symvers tags TAGS cscope* 997 .kernelrelease Module.symvers tags TAGS cscope*
990 998
991# clean - Delete most, but leave enough to build external modules 999# clean - Delete most, but leave enough to build external modules
992# 1000#
@@ -1072,6 +1080,7 @@ help:
1072 @echo ' tags/TAGS - Generate tags file for editors' 1080 @echo ' tags/TAGS - Generate tags file for editors'
1073 @echo ' cscope - Generate cscope index' 1081 @echo ' cscope - Generate cscope index'
1074 @echo ' kernelrelease - Output the release version string' 1082 @echo ' kernelrelease - Output the release version string'
1083 @echo ' kernelversion - Output the version stored in Makefile'
1075 @echo '' 1084 @echo ''
1076 @echo 'Static analysers' 1085 @echo 'Static analysers'
1077 @echo ' buildcheck - List dangling references to vmlinux discarded sections' 1086 @echo ' buildcheck - List dangling references to vmlinux discarded sections'
@@ -1293,6 +1302,8 @@ checkstack:
1293 1302
1294kernelrelease: 1303kernelrelease:
1295 @echo $(KERNELRELEASE) 1304 @echo $(KERNELRELEASE)
1305kernelversion:
1306 @echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
1296 1307
1297# FIXME Should go into a make.lib or something 1308# FIXME Should go into a make.lib or something
1298# =========================================================================== 1309# ===========================================================================
diff --git a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile
index d75e0d77136..5dfc93fd945 100644
--- a/arch/frv/boot/Makefile
+++ b/arch/frv/boot/Makefile
@@ -57,10 +57,10 @@ initrd:
57# installation 57# installation
58# 58#
59install: $(CONFIGURE) Image 59install: $(CONFIGURE) Image
60 sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" 60 sh ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
61 61
62zinstall: $(CONFIGURE) zImage 62zinstall: $(CONFIGURE) zImage
63 sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" 63 sh ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
64 64
65# 65#
66# miscellany 66# miscellany
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index b84119f9cc6..d3c0409d201 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -37,7 +37,10 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
37# CPU-specific tuning. Anything which can be shared with UML should go here. 37# CPU-specific tuning. Anything which can be shared with UML should go here.
38include $(srctree)/arch/i386/Makefile.cpu 38include $(srctree)/arch/i386/Makefile.cpu
39 39
40cflags-$(CONFIG_REGPARM) += -mregparm=3 40# -mregparm=3 works ok on gcc-3.0 and later
41#
42cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \
43 echo "-mregparm=3"; fi ;)
41 44
42# Disable unit-at-a-time mode, it makes gcc use a lot more stack 45# Disable unit-at-a-time mode, it makes gcc use a lot more stack
43# due to the lack of sharing of stacklots. 46# due to the lack of sharing of stacklots.
@@ -100,7 +103,7 @@ AFLAGS += $(mflags-y)
100boot := arch/i386/boot 103boot := arch/i386/boot
101 104
102.PHONY: zImage bzImage compressed zlilo bzlilo \ 105.PHONY: zImage bzImage compressed zlilo bzlilo \
103 zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install 106 zdisk bzdisk fdimage fdimage144 fdimage288 install
104 107
105all: bzImage 108all: bzImage
106 109
@@ -122,8 +125,7 @@ zdisk bzdisk: vmlinux
122fdimage fdimage144 fdimage288: vmlinux 125fdimage fdimage144 fdimage288: vmlinux
123 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ 126 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
124 127
125install: vmlinux 128install:
126install kernel_install:
127 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install 129 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
128 130
129archclean: 131archclean:
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index 1e71382d413..0fea75dd4e3 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -100,5 +100,5 @@ zlilo: $(BOOTIMAGE)
100 cp System.map $(INSTALL_PATH)/ 100 cp System.map $(INSTALL_PATH)/
101 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 101 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
102 102
103install: $(BOOTIMAGE) 103install:
104 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" 104 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
diff --git a/arch/i386/boot/install.sh b/arch/i386/boot/install.sh
index f17b40dfc0f..5e44c736eea 100644
--- a/arch/i386/boot/install.sh
+++ b/arch/i386/boot/install.sh
@@ -19,6 +19,20 @@
19# $4 - default install path (blank if root directory) 19# $4 - default install path (blank if root directory)
20# 20#
21 21
22verify () {
23 if [ ! -f "$1" ]; then
24 echo "" 1>&2
25 echo " *** Missing file: $1" 1>&2
26 echo ' *** You need to run "make" before "make install".' 1>&2
27 echo "" 1>&2
28 exit 1
29 fi
30}
31
32# Make sure the files actually exist
33verify "$2"
34verify "$3"
35
22# User may have a custom install script 36# User may have a custom install script
23 37
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 38if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 57b047c27e4..f722e1a2594 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -25,7 +25,6 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
25 -falign-functions=32 -frename-registers -fno-optimize-sibling-calls 25 -falign-functions=32 -frename-registers -fno-optimize-sibling-calls
26CFLAGS_KERNEL := -mconstant-gp 26CFLAGS_KERNEL := -mconstant-gp
27 27
28GCC_VERSION := $(call cc-version)
29GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 28GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
30CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 29CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
31 30
@@ -37,7 +36,7 @@ $(error Sorry, you need a newer version of the assember, one that is built from
37 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) 36 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
38endif 37endif
39 38
40ifeq ($(GCC_VERSION),0304) 39ifeq ($(call cc-version),0304)
41 cflags-$(CONFIG_ITANIUM) += -mtune=merced 40 cflags-$(CONFIG_ITANIUM) += -mtune=merced
42 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley 41 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
43endif 42endif
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 5f80e58e5cb..d3654a264ef 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -76,8 +76,7 @@ LINUXINCLUDE += $(LINUXINCLUDE-y)
76CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ 76CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
77 77
78ifeq ($(CONFIG_PPC64),y) 78ifeq ($(CONFIG_PPC64),y)
79GCC_VERSION := $(call cc-version) 79GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
80GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi)
81 80
82ifeq ($(CONFIG_POWER4_ONLY),y) 81ifeq ($(CONFIG_POWER4_ONLY),y)
83ifeq ($(CONFIG_ALTIVEC),y) 82ifeq ($(CONFIG_ALTIVEC),y)
@@ -189,10 +188,9 @@ TOUT := .tmp_gas_check
189# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec 188# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
190# instructions. 189# instructions.
191# gcc-3.4 and binutils-2.14 are a fatal combination. 190# gcc-3.4 and binutils-2.14 are a fatal combination.
192GCC_VERSION := $(call cc-version)
193 191
194checkbin: 192checkbin:
195 @if test "$(GCC_VERSION)" = "0304" ; then \ 193 @if test "$(call cc-version)" = "0304" ; then \
196 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ 194 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \
197 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ 195 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \
198 echo 'correctly with gcc-3.4 and your version of binutils.'; \ 196 echo 'correctly with gcc-3.4 and your version of binutils.'; \
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index e719a4933af..98e940beeb3 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -128,10 +128,9 @@ TOUT := .tmp_gas_check
128# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec 128# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
129# instructions. 129# instructions.
130# gcc-3.4 and binutils-2.14 are a fatal combination. 130# gcc-3.4 and binutils-2.14 are a fatal combination.
131GCC_VERSION := $(call cc-version)
132 131
133checkbin: 132checkbin:
134 @if test "$(GCC_VERSION)" = "0304" ; then \ 133 @if test "$(call cc-version)" = "0304" ; then \
135 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ 134 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \
136 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ 135 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \
137 echo 'correctly with gcc-3.4 and your version of binutils.'; \ 136 echo 'correctly with gcc-3.4 and your version of binutils.'; \
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index a9cd42e6182..51d83288d62 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -80,9 +80,12 @@ bzlilo: vmlinux
80bzdisk: vmlinux 80bzdisk: vmlinux
81 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk 81 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
82 82
83install fdimage fdimage144 fdimage288: vmlinux 83fdimage fdimage144 fdimage288: vmlinux
84 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 84 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
85 85
86install:
87 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
88
86archclean: 89archclean:
87 $(Q)$(MAKE) $(clean)=$(boot) 90 $(Q)$(MAKE) $(clean)=$(boot)
88 91
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
index 18c6e915d69..29f8396ed15 100644
--- a/arch/x86_64/boot/Makefile
+++ b/arch/x86_64/boot/Makefile
@@ -98,5 +98,5 @@ zlilo: $(BOOTIMAGE)
98 cp System.map $(INSTALL_PATH)/ 98 cp System.map $(INSTALL_PATH)/
99 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 99 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
100 100
101install: $(BOOTIMAGE) 101install:
102 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" 102 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
diff --git a/arch/x86_64/boot/install.sh b/arch/x86_64/boot/install.sh
index 198af15a775..baaa2369bdb 100644
--- a/arch/x86_64/boot/install.sh
+++ b/arch/x86_64/boot/install.sh
@@ -1,40 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2# 2. $srctree/arch/i386/boot/install.sh
3# arch/x86_64/boot/install.sh
4#
5# This file is subject to the terms and conditions of the GNU General Public
6# License. See the file "COPYING" in the main directory of this archive
7# for more details.
8#
9# Copyright (C) 1995 by Linus Torvalds
10#
11# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
12#
13# "make install" script for i386 architecture
14#
15# Arguments:
16# $1 - kernel version
17# $2 - kernel image file
18# $3 - kernel map file
19# $4 - default install path (blank if root directory)
20#
21
22# User may have a custom install script
23
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
26
27# Default install - same as make zlilo
28
29if [ -f $4/vmlinuz ]; then
30 mv $4/vmlinuz $4/vmlinuz.old
31fi
32
33if [ -f $4/System.map ]; then
34 mv $4/System.map $4/System.old
35fi
36
37cat $2 > $4/vmlinuz
38cp $3 $4/System.map
39
40if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
diff --git a/fs/xfs/Kbuild b/fs/xfs/Kbuild
new file mode 100644
index 00000000000..2566e96706f
--- /dev/null
+++ b/fs/xfs/Kbuild
@@ -0,0 +1,6 @@
1#
2# The xfs people like to share Makefile with 2.6 and 2.4.
3# Utilise file named Kbuild file which has precedence over Makefile.
4#
5
6include $(srctree)/$(obj)/Makefile-linux-2.6
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index db3c708e546..0168d6c3707 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -3,6 +3,7 @@
3 3
4# Convinient variables 4# Convinient variables
5comma := , 5comma := ,
6squote := '
6empty := 7empty :=
7space := $(empty) $(empty) 8space := $(empty) $(empty)
8 9
@@ -12,6 +13,10 @@ space := $(empty) $(empty)
12depfile = $(subst $(comma),_,$(@D)/.$(@F).d) 13depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
13 14
14### 15###
16# Escape single quote for use in echo statements
17escsq = $(subst $(squote),'\$(squote)',$1)
18
19###
15# filechk is used to check if the content of a generated file is updated. 20# filechk is used to check if the content of a generated file is updated.
16# Sample usage: 21# Sample usage:
17# define filechk_sample 22# define filechk_sample
@@ -47,7 +52,7 @@ build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
47 52
48# If quiet is set, only print short version of command 53# If quiet is set, only print short version of command
49cmd = @$(if $($(quiet)cmd_$(1)),\ 54cmd = @$(if $($(quiet)cmd_$(1)),\
50 echo ' $(subst ','\'',$($(quiet)cmd_$(1)))' &&) $(cmd_$(1)) 55 echo ' $(call escsq,$($(quiet)cmd_$(1)))' &&) $(cmd_$(1))
51 56
52# Add $(obj)/ for paths that is not absolute 57# Add $(obj)/ for paths that is not absolute
53objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) 58objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
@@ -68,7 +73,7 @@ endif
68 73
69# echo command. Short version is $(quiet) equals quiet, otherwise full command 74# echo command. Short version is $(quiet) equals quiet, otherwise full command
70echo-cmd = $(if $($(quiet)cmd_$(1)), \ 75echo-cmd = $(if $($(quiet)cmd_$(1)), \
71 echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) 76 echo ' $(call escsq,$($(quiet)cmd_$(1)))';)
72 77
73# function to only execute the passed command if necessary 78# function to only execute the passed command if necessary
74# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file 79# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
@@ -78,7 +83,7 @@ if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
78 @set -e; \ 83 @set -e; \
79 $(echo-cmd) \ 84 $(echo-cmd) \
80 $(cmd_$(1)); \ 85 $(cmd_$(1)); \
81 echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd) 86 echo 'cmd_$@ := $(subst $$,$$$$,$(call escsq,$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
82 87
83# execute the command and also postprocess generated .d dependencies 88# execute the command and also postprocess generated .d dependencies
84# file 89# file
@@ -87,7 +92,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\
87 @set -e; \ 92 @set -e; \
88 $(echo-cmd) \ 93 $(echo-cmd) \
89 $(cmd_$(1)); \ 94 $(cmd_$(1)); \
90 scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ 95 scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \
91 rm -f $(depfile); \ 96 rm -f $(depfile); \
92 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) 97 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
93 98
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 506e3f3befe..c33e62bde6b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -179,10 +179,10 @@ endif
179define rule_cc_o_c 179define rule_cc_o_c
180 $(if $($(quiet)cmd_checksrc),echo ' $($(quiet)cmd_checksrc)';) \ 180 $(if $($(quiet)cmd_checksrc),echo ' $($(quiet)cmd_checksrc)';) \
181 $(cmd_checksrc) \ 181 $(cmd_checksrc) \
182 $(if $($(quiet)cmd_cc_o_c),echo ' $(subst ','\'',$($(quiet)cmd_cc_o_c))';) \ 182 $(if $($(quiet)cmd_cc_o_c),echo ' $(call escsq,$($(quiet)cmd_cc_o_c))';) \
183 $(cmd_cc_o_c); \ 183 $(cmd_cc_o_c); \
184 $(cmd_modversions) \ 184 $(cmd_modversions) \
185 scripts/basic/fixdep $(depfile) $@ '$(subst ','\'',$(cmd_cc_o_c))' > $(@D)/.$(@F).tmp; \ 185 scripts/basic/fixdep $(depfile) $@ '$(call escsq,$(cmd_cc_o_c))' > $(@D)/.$(@F).tmp; \
186 rm -f $(depfile); \ 186 rm -f $(depfile); \
187 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd 187 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd
188endef 188endef
diff --git a/scripts/kconfig/lxdialog/Makefile b/scripts/kconfig/lxdialog/Makefile
index a45a13fb26e..8f41d9a57aa 100644
--- a/scripts/kconfig/lxdialog/Makefile
+++ b/scripts/kconfig/lxdialog/Makefile
@@ -1,42 +1,18 @@
1HOST_EXTRACFLAGS := -DLOCALE 1# Makefile to build lxdialog package
2ifeq ($(shell uname),SunOS) 2#
3HOST_LOADLIBES := -lcurses
4else
5HOST_LOADLIBES := -lncurses
6endif
7 3
8ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) 4check-lxdialog := $(srctree)/$(src)/check-lxdialog.sh
9 HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" 5HOST_EXTRACFLAGS := $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags)
10else 6HOST_LOADLIBES := $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags)
11ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) 7
12 HOST_EXTRACFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" 8HOST_EXTRACFLAGS += -DLOCALE
13else 9
14ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) 10.PHONY: dochecklxdialog
15 HOST_EXTRACFLAGS += -DCURSES_LOC="<ncurses.h>" 11$(obj)/dochecklxdialog:
16else 12 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES)
17 HOST_EXTRACFLAGS += -DCURSES_LOC="<curses.h>"
18endif
19endif
20endif
21 13
22hostprogs-y := lxdialog 14hostprogs-y := lxdialog
23always := ncurses $(hostprogs-y) 15always := $(hostprogs-y) dochecklxdialog
24 16
25lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ 17lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \
26 util.o lxdialog.o msgbox.o 18 util.o lxdialog.o msgbox.o
27
28.PHONY: $(obj)/ncurses
29$(obj)/ncurses:
30 @echo "main() {}" > lxtemp.c
31 @if $(HOSTCC) lxtemp.c $(HOST_LOADLIBES); then \
32 rm -f lxtemp.c a.out; \
33 else \
34 rm -f lxtemp.c; \
35 echo -e "\007" ;\
36 echo ">> Unable to find the Ncurses libraries." ;\
37 echo ">>" ;\
38 echo ">> You must install ncurses-devel in order" ;\
39 echo ">> to use 'make menuconfig'" ;\
40 echo ;\
41 exit 1 ;\
42 fi
diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
new file mode 100644
index 00000000000..a3c141b4967
--- /dev/null
+++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
@@ -0,0 +1,67 @@
1#!/bin/sh
2# Check ncurses compatibility
3
4# What library to link
5ldflags()
6{
7 if [ `uname` == SunOS ]; then
8 echo '-lcurses'
9 else
10 echo '-lncurses'
11 fi
12}
13
14# Where is ncurses.h?
15ccflags()
16{
17 if [ -f /usr/include/ncurses/ncurses.h ]; then
18 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
19 elif [ -f /usr/include/ncurses/curses.h ]; then
20 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
21 elif [ -f /usr/include/ncurses.h ]; then
22 echo '-DCURSES_LOC="<ncurses.h>"'
23 else
24 echo '-DCURSES_LOC="<curses.h>"'
25 fi
26}
27
28compiler=""
29# Check if we can link to ncurses
30check() {
31 echo "main() {}" | $compiler -xc -
32 if [ $? != 0 ]; then
33 echo " *** Unable to find the ncurses libraries." 1>&2
34 echo " *** make menuconfig require the ncurses libraries" 1>&2
35 echo " *** " 1>&2
36 echo " *** Install ncurses (ncurses-devel) and try again" 1>&2
37 echo " *** " 1>&2
38 exit 1
39 fi
40}
41
42usage() {
43 printf "Usage: $0 [-check compiler options|-header|-library]\n"
44}
45
46if [ $# == 0 ]; then
47 usage
48 exit 1
49fi
50
51case "$1" in
52 "-check")
53 shift
54 compiler="$@"
55 check
56 ;;
57 "-ccflags")
58 ccflags
59 ;;
60 "-ldflags")
61 ldflags
62 ;;
63 "*")
64 usage
65 exit 1
66 ;;
67esac
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index e0eedffe565..be97caf664b 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -417,7 +417,7 @@ static int do_input_entry(const char *filename, struct input_device_id *id,
417 do_input(alias, id->sndbit, 0, SND_MAX); 417 do_input(alias, id->sndbit, 0, SND_MAX);
418 sprintf(alias + strlen(alias), "f*"); 418 sprintf(alias + strlen(alias), "f*");
419 if (id->flags&INPUT_DEVICE_ID_MATCH_FFBIT) 419 if (id->flags&INPUT_DEVICE_ID_MATCH_FFBIT)
420 do_input(alias, id->ffbit, 0, SND_MAX); 420 do_input(alias, id->ffbit, 0, FF_MAX);
421 sprintf(alias + strlen(alias), "w*"); 421 sprintf(alias + strlen(alias), "w*");
422 if (id->flags&INPUT_DEVICE_ID_MATCH_SWBIT) 422 if (id->flags&INPUT_DEVICE_ID_MATCH_SWBIT)
423 do_input(alias, id->swbit, 0, SW_MAX); 423 do_input(alias, id->swbit, 0, SW_MAX);
diff --git a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl
index c2d54148a91..4ee6ab2135b 100644
--- a/scripts/reference_discarded.pl
+++ b/scripts/reference_discarded.pl
@@ -71,6 +71,11 @@ foreach $object (keys(%object)) {
71# printf("ignoring %d conglomerate(s)\n", $ignore); 71# printf("ignoring %d conglomerate(s)\n", $ignore);
72 72
73# printf("Scanning objects\n"); 73# printf("Scanning objects\n");
74
75# Keith Ownes <kaos@sgi.com> commented:
76# For our future {in}sanity, add a comment that this is the ppc .opd
77# section, not the ia64 .opd section.
78# ia64 .opd should not point to discarded sections.
74$errorcount = 0; 79$errorcount = 0;
75foreach $object (keys(%object)) { 80foreach $object (keys(%object)) {
76 my $from; 81 my $from;
@@ -88,6 +93,7 @@ foreach $object (keys(%object)) {
88 ($from !~ /\.text\.exit$/ && 93 ($from !~ /\.text\.exit$/ &&
89 $from !~ /\.exit\.text$/ && 94 $from !~ /\.exit\.text$/ &&
90 $from !~ /\.data\.exit$/ && 95 $from !~ /\.data\.exit$/ &&
96 $from !~ /\.opd$/ &&
91 $from !~ /\.exit\.data$/ && 97 $from !~ /\.exit\.data$/ &&
92 $from !~ /\.altinstructions$/ && 98 $from !~ /\.altinstructions$/ &&
93 $from !~ /\.pdr$/ && 99 $from !~ /\.pdr$/ &&
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index f54dac88cfd..9a23825218f 100644
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -17,6 +17,6 @@ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
17 17
18 # Are there uncommitted changes? 18 # Are there uncommitted changes?
19 if git diff-files | read dummy; then 19 if git diff-files | read dummy; then
20 printf '%s' -git_dirty 20 printf '%s' -dirty
21 fi 21 fi
22fi 22fi