History

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

Linus Torvalds committed 16 years ago

Commit c9e2a722 parents 9aca0e7 d63f6d116 files · +61 −163Browse files

Showing the changes to scripts (5 of 16 files). Show all

Unified · Split

5 files
  1. scripts/Makefile.clean +2 −0
  2. scripts/Makefile.lib +3 −1
  3. scripts/kallsyms.c +2 −6
  4. scripts/mod/modpost.c +4 −1
  5. scripts/setlocalversion +4 −2
scripts/Makefile.clean+2−0
@@ -45,6 +45,8 @@ __clean-files := $(extra-y) $(always) \ · 44 unmodified lines
4545 $(host-progs) \
4646 $(hostprogs-y) $(hostprogs-m) $(hostprogs-)
4747
48+__clean-files := $(filter-out $(no-clean-files), $(__clean-files))
49+
4850 # as clean-files is given relative to the current directory, this adds
4951 # a $(obj) prefix, except for absolute paths
5052
scripts/Makefile.lib+3−1
@@ -120,7 +120,9 @@ _c_flags += $(if $(patsubst n%,, \ · 119 unmodified lines
120120 endif
121121
122122 ifdef CONFIG_SYMBOL_PREFIX
123−_cpp_flags += -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))
123+_sym_flags = -DSYMBOL_PREFIX=$(patsubst "%",%,$(CONFIG_SYMBOL_PREFIX))
124+_cpp_flags += $(_sym_flags)
125+_a_flags += $(_sym_flags)
124126 endif
125127
126128
scripts/kallsyms.c+2−6
@@ -107,12 +107,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) · 106 unmodified lines
107107
108108 rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str);
109109 if (rc != 3) {
110− if (rc != EOF) {
111− /* skip line. sym is used as dummy to
112− * shut of "warn_unused_result" warning.
113− */
114− sym = fgets(str, 500, in);
115− }
110+ if (rc != EOF && fgets(str, 500, in) == NULL)
111+ fprintf(stderr, "Read error or end of file.\n");
116112 return -1;
117113 }
118114
scripts/mod/modpost.c+4−1
@@ -1208,6 +1208,9 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr, · 1207 unmodified lines
12081208 * .cpuinit.data => __cpudata
12091209 * .memexitconst => __memconst
12101210 * etc.
1211+ *
1212+ * The memory of returned value has been allocated on a heap. The user of this
1213+ * method should free it after usage.
12111214 */
12121215 static char *sec2annotation(const char *s)
12131216 {
@@ -1230,7 +1233,7 @@ static char *sec2annotation(const char *s) · 16 unmodified lines
12301233 strcat(p, "data ");
12311234 else
12321235 strcat(p, " ");
1233− return r; /* we leak her but we do not care */
1236+ return r;
12341237 } else {
12351238 return strdup("");
12361239 }
scripts/setlocalversion+4−2
@@ -160,8 +160,10 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then · 159 unmodified lines
160160 # full scm version string
161161 res="$res$(scm_version)"
162162 else
163− # apped a plus sign if the repository is not in a clean tagged
164− # state and LOCALVERSION= is not specified
163+ # append a plus sign if the repository is not in a clean
164+ # annotated or signed tagged state (as git describe only
165+ # looks at signed or annotated tags - git tag -a/-s) and
166+ # LOCALVERSION= is not specified
165167 if test "${LOCALVERSION+set}" != "set"; then
166168 scm=$(scm_version --short)
167169 res="$res${scm:++}"