From a95bcfac2b5f353f99c6a338d77eb5584ab35d83 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Wed, 7 May 2008 16:04:31 +0900 Subject: kbuild: escape meta characters in regular expression in make TAGS Alexey Dobriyan introduced a code adds menuconfig SOMETHING in Kconfig to tags output when you did "make tags". See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=80ff26241623875636674a31c0540a78c0fb5433 "make tags" may work fine with his code. However make TAGS doesn't work well because etags command requires backslashes to escape meta characters like `(', `)' and `|'. Here is a patch. Signed-off-by: Masatake YAMATO Signed-off-by: Sam Ravnborg diff --git a/Makefile b/Makefile index 4492984..d4aa4378 100644 --- a/Makefile +++ b/Makefile @@ -1431,7 +1431,7 @@ define xtags elif $1 --version 2>&1 | grep -iq emacs; then \ $(all-sources) | xargs $1 -a; \ $(all-kconfigs) | xargs $1 -a \ - --regex='/^[ \t]*(menu|)config[ \t]+\([a-zA-Z0-9_]+\)/\2/'; \ + --regex='/^[ \t]*\(\(menu\)*config\)[ \t]+\([a-zA-Z0-9_]+\)/\3/'; \ $(all-defconfigs) | xargs -r $1 -a \ --regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \ else \ -- cgit v0.10.2 From fd1db0a31319bd21c521b197ce17c557556b821b Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Thu, 8 May 2008 13:41:11 +0200 Subject: kbuild: disable modpost warnings for linkonce sections Disable modpost warnings for linkonce sections My build gives lots of warnings like WARNING: sound/core/snd.o (.gnu.linkonce.wi.mpspec_def.h.30779716): unexpected section name. The (.[number]+) following section name are ld generated and not expected. Did you forget to use "ax"/"aw" in a .S file? Note that for example contains section definitions for use in .S files. But for .linkonce. duplicated sections are actually ok and expected. So just disable the warning for this case. Signed-off-by: Andi Kleen Signed-off-by: Sam Ravnborg diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 757294b..508c589 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -721,7 +721,7 @@ static int check_section(const char *modname, const char *sec) /* consume all digits */ while (*e && e != sec && isdigit(*e)) e--; - if (*e == '.') { + if (*e == '.' && !strstr(sec, ".linkonce")) { warn("%s (%s): unexpected section name.\n" "The (.[number]+) following section name are " "ld generated and not expected.\n" -- cgit v0.10.2 From 591b0179e80f7d59b5e6e57063e92fdbface98fb Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 11 May 2008 10:07:03 +0200 Subject: MAINTAINERS: document names of new kbuild trees Signed-off-by: Sam Ravnborg diff --git a/MAINTAINERS b/MAINTAINERS index f5583dc..74b1c55 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2318,7 +2318,8 @@ S: Maintained KERNEL BUILD (kbuild: Makefile, scripts/Makefile.*) P: Sam Ravnborg M: sam@ravnborg.org -T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild.git +T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-next.git +T: git kernel.org:/pub/scm/linux/kernel/git/sam/kbuild-fixes.git L: linux-kbuild@vger.kernel.org S: Maintained -- cgit v0.10.2 From 1f5d3a6b6532e25a5cdf1f311956b2b03d343a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Fri, 2 May 2008 14:10:08 +0300 Subject: Remove *.rej pattern from .gitignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With commit 3f1b0e1f287547903f11fa1e6de7d2765597766e ".gitignore update" Linus's current git tree starts to ignore any "*.rej" files. So "git status" no longer shows these files, but the ones who works with quilt patchsets, this not makes life easier as expected. Because sometimes a work flow (at least for me) requires "quilt push -f" followed by "git status" to see unresolved merge conflicts, work on these conflicts to correct them and finalize the patch with "quilt refresh". And if there are some "*.rej" files exists in tree, for whatever reason, this means something goes really wrong there and i think this situation not deserves to be ignored. Signed-off-by: S.Çağlar Onur Signed-off-by: Sam Ravnborg diff --git a/.gitignore b/.gitignore index 090b293..9c0d650 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,5 @@ series cscope.* *.orig -*.rej *~ \#*# -- cgit v0.10.2 From aab34ac8582303ef57b792710fc5dd5991477475 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 19 May 2008 20:07:58 +0200 Subject: kbuild: filter away debug symbols from kernel symbols Andi Kleen reported that he saw a lot of symbols like this: 0000000000000b24 N DW.aio.h.903a6d92.2 0000000000000bce N DW.task_io_accounting.h.8d8de327.0 0000000000000bec N DW.hrtimer.h.c23659c6.0 in his System.map / kallsyms output. Simple solution is to skip all debugging symbols (they are marked 'N'). Signed-off-by: Sam Ravnborg Cc: Paulo Marques diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 5d20a2e..ad2434b 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -108,6 +108,9 @@ static int read_symbol(FILE *in, struct sym_entry *s) /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */ else if (str[0] == '$') return -1; + /* exclude debugging symbols */ + else if (stype == 'N') + return -1; /* include the type field in the symbol name, so that it gets * compressed together */ diff --git a/scripts/mksysmap b/scripts/mksysmap index 4390fab..6e133a0 100644 --- a/scripts/mksysmap +++ b/scripts/mksysmap @@ -32,6 +32,7 @@ # For System.map filter away: # a - local absolute symbols # U - undefined global symbols +# N - debugging symbols # w - local weak symbols # readprofile starts reading symbols when _stext is found, and @@ -40,5 +41,5 @@ # so we just ignore them to let readprofile continue to work. # (At least sparc64 has __crc_ in the middle). -$NM -n $1 | grep -v '\( [aUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 +$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > $2 -- cgit v0.10.2 From 7b97887eab6c35d23f2e4680bd5e285415068f35 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 16 May 2008 15:45:52 -0700 Subject: kernel-doc: allow unnamed bit-fields Allow for unnamed bit-fields and skip them instead of printing an erroneous warning message for them, such as: Warning(include/asm-s390/cio.h:103): No description found for parameter 'u32' which contains: struct tm_scsw { u32 :1; Signed-off-by: Randy Dunlap Signed-off-by: Sam Ravnborg diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 83cee18..88e3934 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1556,7 +1556,9 @@ sub create_parameterlist($$$) { push_parameter($2, "$type $1", $file); } elsif ($param =~ m/(.*?):(\d+)/) { - push_parameter($1, "$type:$2", $file) + if ($type ne "") { # skip unnamed bit-fields + push_parameter($1, "$type:$2", $file) + } } else { push_parameter($param, $type, $file); -- cgit v0.10.2 From 107f43a0f7282511ec570214a0b8f639224ff525 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Sun, 18 May 2008 23:10:24 +0200 Subject: kconfig: incorrect 'len' field initialisation ? 1) The field 'len' of the 'gstr' structure seems to track the size of the memory already allocated for the "growable string". So the value of this field should be the same as the 'malloc()' just above, shouldn't it ? Signed-off-by: Christophe Jaillet Signed-off-by: Sam Ravnborg diff --git a/scripts/kconfig/util.c b/scripts/kconfig/util.c index f8e73c0..3cc9f93 100644 --- a/scripts/kconfig/util.c +++ b/scripts/kconfig/util.c @@ -77,7 +77,7 @@ struct gstr str_new(void) { struct gstr gs; gs.s = malloc(sizeof(char) * 64); - gs.len = 16; + gs.len = 64; strcpy(gs.s, "\0"); return gs; } -- cgit v0.10.2 From 7d3cc8b6d899e53222c22a78d98bb53a695f7962 Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Fri, 16 May 2008 13:54:59 +0200 Subject: Don't clean bounds.h and asm-offsets.h Since 97965478a66fbdf0f4ad5e4ecc4828f0cb548a45 ("mm: Get rid of __ZONE_COUNT") mmzone.h includes bounds.h. Calling make clean after make prepare removes bounds.h again so when building external modules this fails. Signed-off-by: Jan Blunck Signed-off-by: Sam Ravnborg -- diff --git a/Kbuild b/Kbuild index 32f19c5..e750e9c 100644 --- a/Kbuild +++ b/Kbuild @@ -96,5 +96,4 @@ missing-syscalls: scripts/checksyscalls.sh FORCE $(call cmd,syscalls) # Delete all targets during make clean -clean-files := $(addprefix $(objtree)/,$(targets)) - +clean-files := $(addprefix $(objtree)/,$(filter-out $(bounds-file) $(offsets-file),$(targets))) diff --git a/Makefile b/Makefile index d4aa4378..f18631f 100644 --- a/Makefile +++ b/Makefile @@ -1114,6 +1114,7 @@ MRPROPER_DIRS += include/config include2 usr/include MRPROPER_FILES += .config .config.old include/asm .version .old_version \ include/linux/autoconf.h include/linux/version.h \ include/linux/utsrelease.h \ + include/linux/bounds.h include/asm*/asm-offsets.h \ Module.symvers tags TAGS cscope* # clean - Delete most, but leave enough to build external modules -- cgit v0.10.2