bk://linux-sam.bkbits.net/kbuild rddunlap@osdl.org[sam]|ChangeSet|20050314215757|39641 rddunlap # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2005/03/14 23:26:47-08:00 akpm@bix.(none) # Merge bk://linux-sam.bkbits.net/kbuild # into bix.(none):/usr/src/bk-kbuild # # arch/i386/Makefile # 2005/03/14 23:26:42-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Makefile # 2005/03/14 23:26:42-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/14 23:25:14-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-kbuild # # Makefile # 2005/03/14 23:25:08-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/14 22:57:57+01:00 rddunlap@osdl.org # kbuild: fix buildcheck # # I should not have added init.text test here; # it's more than useless, it actually degrades the output. # # Signed-off-by: Randy Dunlap # Signed-off-by: Sam Ravnborg # # scripts/reference_discarded.pl # 2005/03/14 22:46:07+01:00 rddunlap@osdl.org +0 -2 # kbuild: fix buildcheck # # ChangeSet # 2005/03/14 22:42:50+01:00 kaos@ocs.com.au # kbuild: Add target debug_kallsyms # # Make it easier to generate maps for debugging kallsyms problems. # debug_kallsyms is only a debugging target so no help or silent mode. # # Signed-off-by: Keith Owens # Signed-off-by: Sam Ravnborg # # Makefile # 2005/02/26 11:30:54+01:00 kaos@ocs.com.au +10 -0 # kbuild: Add target debug_kallsyms # # ChangeSet # 2005/03/14 22:36:24+01:00 mpm@selenic.com # ikbuild: "PREEMPT" in UTS_VERSION # # Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make # preempt kernels easily identifiable. # Added SMP PREEMPT as comment in compile.h to force it to be # updated when they change (sam). # # Signed-off-by: Matt Mackall # Signed-off-by: Sam Ravnborg # # scripts/mkcompile_h # 2005/03/14 21:43:50+01:00 mpm@selenic.com +8 -4 # ikbuild: "PREEMPT" in UTS_VERSION # # init/Makefile # 2005/03/14 21:30:13+01:00 mpm@selenic.com +2 -1 # ikbuild: "PREEMPT" in UTS_VERSION # # ChangeSet # 2005/03/14 22:29:01+01:00 sam@mars.ravnborg.org # kbuild/i386: introduce make kernel_install # # Removing the dependency on vmlinux for the install target raised a few complaints, # so instead added a new target: kernel_install. # # kernel_install will install the kernel jsut like the ordinary install target. The only difference is # that install has a dependency on vmlinux, kernel_install does not. # # kernel_install is similar to modules_install in the fact that neither does a full kernel # compile before performing the install. In this way they are good for root use. # Also added back the dependency on vmlinux for the install target. # # Signed-off-by: Sam Ravnborg # # arch/i386/Makefile # 2005/03/14 22:28:40+01:00 sam@mars.ravnborg.org +4 -3 # introduce kernel_install # # ChangeSet # 2005/03/14 20:56:01+01:00 sam@mars.ravnborg.org # kbuild: Avoid inconsistent kallsyms data # # Several reports on inconsistent kallsyms data has been caused by the aliased symbols # __sched_text_start and __down to shift places in the output of nm. # The root cause was that on second pass ld aligned __sched_text_start to a 4 byte boundary # which is the function alignment on i386. # sched.text and spinlock.text is now aligned to an 8 byte boundary to make sure they # are aligned to a function alignemnt on most (all?) archs. # # Tested by: Paulo Marques # Tested by: Alexander Stohr # # Signed-off-by: Sam Ravnborg # # include/asm-generic/vmlinux.lds.h # 2005/03/14 20:55:39+01:00 sam@mars.ravnborg.org +9 -0 # Align sched.text and spinlock.text to an 8 byte boundary # # ChangeSet # 2005/03/14 20:38:16+01:00 rddunlap@osdl.org # buildcheck: reduce DEBUG_INFO noise from reference* scripts # # Reduce noise in 'make buildcheck' that is caused by CONFIG_DEBUG_INFO=y. # # Signed-off-by: Randy Dunlap # Signed-off-by: Sam Ravnborg # # scripts/reference_init.pl # 2005/03/14 19:40:19+01:00 rddunlap@osdl.org +1 -0 # buildcheck: reduce DEBUG_INFO noise from reference* scripts # # scripts/reference_discarded.pl # 2005/03/14 19:38:47+01:00 rddunlap@osdl.org +3 -0 # buildcheck: reduce DEBUG_INFO noise from reference* scripts # # ChangeSet # 2005/03/13 23:15:25+01:00 sam@mars.ravnborg.org # kbuild/ppc: Tell when uImage was not build # # Tom Rini said: # Note that there is still a trivial'ish change to make. When mkimage # doesn't exist on the host we should say "uImage not made" or # something similar. # # Signed-off-by: Sam Ravnborg # # arch/ppc/boot/images/Makefile # 2005/03/13 23:15:05+01:00 sam@mars.ravnborg.org +2 -1 # Tell when uImage was not made # # ChangeSet # 2005/03/13 20:10:40+01:00 matthew@wil.cx # kbuild: Fix build as root then user # # I inadvertently built a tree as root and then rebuilt it as a user. I # got a lot of prompts ... # # mv: overwrite `drivers/char/drm/drm_auth.o', overriding mode 0644? # # Using mv -f fixes that. # # Signed-off-by: Matthew Wilcox # Signed-off-by: Sam Ravnborg # # scripts/Makefile.build # 2005/02/07 15:31:32+01:00 matthew@wil.cx +1 -1 # kbuild: Fix build as root then user # # ChangeSet # 2005/03/13 16:58:21+01:00 sam@mars.ravnborg.org # kbuild: Allow arch settings to CROSS_COMPILE to take effect # # Move definition os NOSTDINC_FLAGS below inclusion of arch Makefile, so any # arch specific settings to $(CC) takes effect before looking up the # compiler include directory. # # This decreases kernel compile time with 0.1 second (3.6 -> 3.5 seconds) when # running make on a fully build kernel # # Signed-off-by: Sam Ravnborg # # Makefile # 2005/03/13 16:58:00+01:00 sam@mars.ravnborg.org +4 -2 # Allow arch settings to CROSS_COMPILE to take effect # # ChangeSet # 2005/03/12 21:28:11-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-kbuild # # include/linux/module.h # 2005/03/12 21:28:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/video/console/Makefile # 2005/03/12 21:28:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/12 12:41:56-08:00 akpm@bix.(none) # Merge bk://linux-sam.bkbits.net/kbuild # into bix.(none):/usr/src/bk-kbuild # # kernel/kallsyms.c # 2005/03/12 12:41:51-08:00 akpm@bix.(none) +0 -0 # Auto merged # # kernel/Makefile # 2005/03/12 12:41:51-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/video/console/Makefile # 2005/03/12 12:41:51-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/Makefile # 2005/03/12 12:41:51-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Makefile # 2005/03/12 12:41:51-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/12 12:40:11-08:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-kbuild # # include/linux/module.h # 2005/03/12 12:40:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/video/console/Makefile # 2005/03/12 12:40:05-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/11 13:03:33-08:00 akpm@bix.(none) # Merge bk://linux-sam.bkbits.net/kbuild # into bix.(none):/usr/src/bk-kbuild # # Makefile # 2005/03/11 13:03:28-08:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2005/03/10 17:43:14-08:00 akpm@bix.(none) # Merge bk://linux-sam.bkbits.net/kbuild # into bix.(none):/usr/src/bk-kbuild # # kernel/kallsyms.c # 2005/03/10 17:43:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # kernel/Makefile # 2005/03/10 17:43:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/video/console/Makefile # 2005/03/10 17:43:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/Makefile # 2005/03/10 17:43:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # # Makefile # 2005/03/10 17:43:06-08:00 akpm@bix.(none) +0 -0 # Auto merged # diff -Nru a/Makefile b/Makefile --- a/Makefile 2005-03-15 23:39:27 -08:00 +++ b/Makefile 2005-03-15 23:39:27 -08:00 @@ -332,9 +332,7 @@ PERL = perl CHECK = sparse -NOSTDINC_FLAGS = -nostdinc -isystem $(shell $(CC) -print-file-name=include) CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -CHECKFLAGS += $(NOSTDINC_FLAGS) MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS) @@ -531,6 +529,10 @@ include $(srctree)/arch/$(ARCH)/Makefile +# arch Makefile may override CC so keep this after arch Makefile is included +NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include) +CHECKFLAGS += $(NOSTDINC_FLAGS) + # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) @@ -719,6 +721,16 @@ # Needs to visit scripts/ before $(KALLSYMS) can be used. $(KALLSYMS): scripts ; + +# Generate some data for debugging strange kallsyms problems +debug_kallsyms: .tmp_map$(last_kallsyms) + +.tmp_map%: .tmp_vmlinux% FORCE + ($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) | sort > $@ + +.tmp_map3: .tmp_map2 + +.tmp_map2: .tmp_map1 endif # ifdef CONFIG_KALLSYMS diff -Nru a/arch/i386/Makefile b/arch/i386/Makefile --- a/arch/i386/Makefile 2005-03-15 23:39:27 -08:00 +++ b/arch/i386/Makefile 2005-03-15 23:39:27 -08:00 @@ -123,7 +123,7 @@ boot := arch/i386/boot .PHONY: zImage bzImage compressed zlilo bzlilo \ - zdisk bzdisk fdimage fdimage144 fdimage288 install + zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install all: bzImage @@ -145,8 +145,9 @@ fdimage fdimage144 fdimage288: vmlinux $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ -install: - $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ +install: vmlinux +install kernel_install: + $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install prepare: include/asm-$(ARCH)/asm_offsets.h CLEAN_FILES += include/asm-$(ARCH)/asm_offsets.h diff -Nru a/arch/ppc/boot/images/Makefile b/arch/ppc/boot/images/Makefile --- a/arch/ppc/boot/images/Makefile 2005-03-15 23:39:27 -08:00 +++ b/arch/ppc/boot/images/Makefile 2005-03-15 23:39:27 -08:00 @@ -20,8 +20,9 @@ targets += uImage $(obj)/uImage: $(obj)/vmlinux.gz + $(Q)rm -f $@ $(call if_changed,uimage) - @echo ' Image $@ is ready' + @echo ' Image: $@' $(if $(wildcard $@),'is ready','not made') # Files generated that shall be removed upon make clean clean-files := sImage vmapus vmlinux* miboot* zImage* uImage diff -Nru a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h --- a/include/asm-generic/vmlinux.lds.h 2005-03-15 23:39:27 -08:00 +++ b/include/asm-generic/vmlinux.lds.h 2005-03-15 23:39:27 -08:00 @@ -6,6 +6,9 @@ #define VMLINUX_SYMBOL(_sym_) _sym_ #endif +/* Align . to a 8 byte boundary equals to maximum function alignment. */ +#define ALIGN_FUNCTION() . = ALIGN(8) + #define RODATA \ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ *(.rodata) *(.rodata.*) \ @@ -79,12 +82,18 @@ VMLINUX_SYMBOL(__security_initcall_end) = .; \ } +/* sched.text is aling to function alignment to secure we have same + * address even at second ld pass when generating System.map */ #define SCHED_TEXT \ + ALIGN_FUNCTION(); \ VMLINUX_SYMBOL(__sched_text_start) = .; \ *(.sched.text) \ VMLINUX_SYMBOL(__sched_text_end) = .; +/* spinlock.text is aling to function alignment to secure we have same + * address even at second ld pass when generating System.map */ #define LOCK_TEXT \ + ALIGN_FUNCTION(); \ VMLINUX_SYMBOL(__lock_text_start) = .; \ *(.spinlock.text) \ VMLINUX_SYMBOL(__lock_text_end) = .; diff -Nru a/init/Makefile b/init/Makefile --- a/init/Makefile 2005-03-15 23:39:27 -08:00 +++ b/init/Makefile 2005-03-15 23:39:27 -08:00 @@ -25,4 +25,5 @@ include/linux/compile.h: FORCE @echo ' CHK $@' - @$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)" + $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \ + "$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" "$(CC) $(CFLAGS)" diff -Nru a/scripts/Makefile.build b/scripts/Makefile.build --- a/scripts/Makefile.build 2005-03-15 23:39:27 -08:00 +++ b/scripts/Makefile.build 2005-03-15 23:39:27 -08:00 @@ -169,7 +169,7 @@ -T $(@D)/.tmp_$(@F:.o=.ver); \ rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ else \ - mv $(@D)/.tmp_$(@F) $@; \ + mv -f $(@D)/.tmp_$(@F) $@; \ fi; endif diff -Nru a/scripts/mkcompile_h b/scripts/mkcompile_h --- a/scripts/mkcompile_h 2005-03-15 23:39:27 -08:00 +++ b/scripts/mkcompile_h 2005-03-15 23:39:27 -08:00 @@ -1,7 +1,8 @@ TARGET=$1 ARCH=$2 SMP=$3 -CC=$4 +PREEMPT=$4 +CC=$5 # If compile.h exists already and we don't own autoconf.h # (i.e. we're not the same user who did make *config), don't @@ -26,8 +27,10 @@ UTS_VERSION="#$VERSION" -if [ -n "$SMP" ] ; then UTS_VERSION="$UTS_VERSION SMP"; fi -UTS_VERSION="$UTS_VERSION `LC_ALL=C LANG=C date`" +CONFIG_FLAGS="" +if [ -n "$SMP" ] ; then CONFIG_FLAGS="SMP"; fi +if [ -n "$PREEMPT" ] ; then CONFIG_FLAGS="$CONFIG_FLAGS PREEMPT"; fi +UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS `LC_ALL=C LANG=C date`" # Truncate to maximum length @@ -37,7 +40,8 @@ # Generate a temporary compile.h ( echo /\* This file is auto generated, version $VERSION \*/ - + if [ -n "$CONFIG_FLAGS" ] ; then echo "/* $CONFIG_FLAGS */"; fi + echo \#define UTS_MACHINE \"$ARCH\" echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\" diff -Nru a/scripts/reference_discarded.pl b/scripts/reference_discarded.pl --- a/scripts/reference_discarded.pl 2005-03-15 23:39:27 -08:00 +++ b/scripts/reference_discarded.pl 2005-03-15 23:39:27 -08:00 @@ -96,6 +96,7 @@ $from !~ /\.debug_ranges$/ && $from !~ /\.debug_line$/ && $from !~ /\.debug_frame$/ && + $from !~ /\.debug_loc$/ && $from !~ /\.exitcall\.exit$/ && $from !~ /\.eh_frame$/ && $from !~ /\.stab$/)) { diff -Nru a/scripts/reference_init.pl b/scripts/reference_init.pl --- a/scripts/reference_init.pl 2005-03-15 23:39:27 -08:00 +++ b/scripts/reference_init.pl 2005-03-15 23:39:27 -08:00 @@ -98,6 +98,7 @@ $from !~ /\.pdr$/ && $from !~ /\__param$/ && $from !~ /\.altinstructions/ && + $from !~ /\.eh_frame/ && $from !~ /\.debug_/)) { printf("Error: %s %s refers to %s\n", $object, $from, $line); }