diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 15:13:55 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 15:13:55 -0700 |
commit | c9e2a72ff1acfdffdecb338b3d997f90c507e665 (patch) | |
tree | 9be4b7e6a1cb90ffa86148a3937021118a5913c0 /scripts | |
parent | 9aca0e7c8c3a8f1fa6e3058abc5465b0509f0f8e (diff) | |
parent | d63f6d1b4d3ad0d88685a5f8eb1c3cac01ddd0db (diff) | |
download | linux-c9e2a72ff1acfdffdecb338b3d997f90c507e665.tar.bz2 |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
initramfs: Fix build break on symbol-prefixed archs
initramfs: fix initramfs size calculation
initramfs: generalize initramfs_data.xxx.S variants
scripts/kallsyms: Enable error messages while hush up unnecessary warnings
scripts/setlocalversion: update comment
kbuild: Use a single clean rule for kernel and external modules
kbuild: Do not run make clean in $(srctree)
scripts/mod/modpost.c: fix commentary accordingly to last changes
kbuild: Really don't clean bounds.h and asm-offsets.h
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.clean | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 4 | ||||
-rw-r--r-- | scripts/kallsyms.c | 8 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 5 | ||||
-rwxr-xr-x | scripts/setlocalversion | 6 |
5 files changed, 15 insertions, 10 deletions
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 6f89fbb56256..686cb0d31c7c 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -45,6 +45,8 @@ __clean-files := $(extra-y) $(always) \ $(host-progs) \ $(hostprogs-y) $(hostprogs-m) $(hostprogs-) +__clean-files := $(filter-out $(no-clean-files), $(__clean-files)) + # as clean-files is given relative to the current directory, this adds # a $(obj) prefix, except for absolute paths diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7bfcf1a09ac5..4c72c1189479 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -120,7 +120,9 @@ _c_flags += $(if $(patsubst n%,, \ endif ifdef CONFIG_SYMBOL_PREFIX -_cpp_flags += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) +_sym_flags = -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX)) +_cpp_flags += $(_sym_flags) +_a_flags += $(_sym_flags) endif diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index e3902fb39afd..60dd3eb9366e 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -107,12 +107,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str); if (rc != 3) { - if (rc != EOF) { - /* skip line. sym is used as dummy to - * shut of "warn_unused_result" warning. - */ - sym = fgets(str, 500, in); - } + if (rc != EOF && fgets(str, 500, in) == NULL) + fprintf(stderr, "Read error or end of file.\n"); return -1; } diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1ec7158b6c1f..33122ca04e7c 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1208,6 +1208,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, * .cpuinit.data => __cpudata * .memexitconst => __memconst * etc. + * + * The memory of returned value has been allocated on a heap. The user of this + * method should free it after usage. */ static char *sec2annotation(const char *s) { @@ -1230,7 +1233,7 @@ static char *sec2annotation(const char *s) strcat(p, "data "); else strcat(p, " "); - return r; /* we leak her but we do not care */ + return r; } else { return strdup(""); } diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 057b6b3c5dfb..ef8729f48586 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion @@ -160,8 +160,10 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then # full scm version string res="$res$(scm_version)" else - # apped a plus sign if the repository is not in a clean tagged - # state and LOCALVERSION= is not specified + # append a plus sign if the repository is not in a clean + # annotated or signed tagged state (as git describe only + # looks at signed or annotated tags - git tag -a/-s) and + # LOCALVERSION= is not specified if test "${LOCALVERSION+set}" != "set"; then scm=$(scm_version --short) res="$res${scm:++}" |