aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 21:41:27 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 21:41:27 -0500
commitdede6faac448db4251f8996d7dec6afb5a43726a (patch)
treedcf34d731bc4626b9e232151acee3673da84adaf
parent21404b772a1c65f7b935b8c0fddc388a949f4e31 (diff)
parent5f7efb4c6da9f90cb306923ced2a6494d065a595 (diff)
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: Kbuild: append missing-syscalls to the default target list genksyms: Regenerate lexer and parser genksyms: Do not expand internal types genksyms: Minor parser cleanup Makefile: remove a duplicated line fixdep: fix extraneous dependencies scripts/Makefile.build: do not reference EXTRA_CFLAGS as CFLAGS replacement kbuild: prevent make from deleting _shipped files kbuild: Do not delete empty files in make distclean
-rw-r--r--Kbuild6
-rw-r--r--Makefile4
-rw-r--r--scripts/Makefile.build2
-rw-r--r--scripts/Makefile.lib4
-rw-r--r--scripts/basic/fixdep.c1
-rw-r--r--scripts/genksyms/genksyms.c3
-rw-r--r--scripts/genksyms/genksyms.h4
-rw-r--r--scripts/genksyms/lex.l8
-rw-r--r--scripts/genksyms/lex.lex.c_shipped12
-rw-r--r--scripts/genksyms/parse.tab.c_shipped645
-rw-r--r--scripts/genksyms/parse.tab.h_shipped7
-rw-r--r--scripts/genksyms/parse.y40
12 files changed, 404 insertions, 332 deletions
diff --git a/Kbuild b/Kbuild
index 2114113ceca2..4caab4f6cba7 100644
--- a/Kbuild
+++ b/Kbuild
@@ -88,11 +88,13 @@ $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s Kbuild
88# 3) Check for missing system calls 88# 3) Check for missing system calls
89# 89#
90 90
91always += missing-syscalls
92targets += missing-syscalls
93
91quiet_cmd_syscalls = CALL $< 94quiet_cmd_syscalls = CALL $<
92 cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags) 95 cmd_syscalls = $(CONFIG_SHELL) $< $(CC) $(c_flags)
93 96
94PHONY += missing-syscalls 97missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
95missing-syscalls: scripts/checksyscalls.sh FORCE
96 $(call cmd,syscalls) 98 $(call cmd,syscalls)
97 99
98# Keep these two files during make clean 100# Keep these two files during make clean
diff --git a/Makefile b/Makefile
index 07bc92544e9c..ed25c5b35470 100644
--- a/Makefile
+++ b/Makefile
@@ -983,7 +983,6 @@ archprepare: prepare1 scripts_basic
983 983
984prepare0: archprepare FORCE 984prepare0: archprepare FORCE
985 $(Q)$(MAKE) $(build)=. 985 $(Q)$(MAKE) $(build)=.
986 $(Q)$(MAKE) $(build)=. missing-syscalls
987 986
988# All the preparing.. 987# All the preparing..
989prepare: prepare0 988prepare: prepare0
@@ -1198,7 +1197,7 @@ distclean: mrproper
1198 @find $(srctree) $(RCS_FIND_IGNORE) \ 1197 @find $(srctree) $(RCS_FIND_IGNORE) \
1199 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ 1198 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
1200 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ 1199 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
1201 -o -name '.*.rej' -o -size 0 \ 1200 -o -name '.*.rej' \
1202 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ 1201 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
1203 -type f -print | xargs rm -f 1202 -type f -print | xargs rm -f
1204 1203
@@ -1296,7 +1295,6 @@ help:
1296 @echo ' 2: warnings which occur quite often but may still be relevant' 1295 @echo ' 2: warnings which occur quite often but may still be relevant'
1297 @echo ' 3: more obscure warnings, can most likely be ignored' 1296 @echo ' 3: more obscure warnings, can most likely be ignored'
1298 @echo ' Multiple levels can be combined with W=12 or W=123' 1297 @echo ' Multiple levels can be combined with W=12 or W=123'
1299 @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
1300 @echo '' 1298 @echo ''
1301 @echo 'Execute "make" or "make all" to build all targets marked with [*] ' 1299 @echo 'Execute "make" or "make all" to build all targets marked with [*] '
1302 @echo 'For further info see the ./README file' 1300 @echo 'For further info see the ./README file'
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index a0fd5029cfe7..d2b366c16b64 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -46,7 +46,7 @@ include $(kbuild-file)
46# If the save-* variables changed error out 46# If the save-* variables changed error out
47ifeq ($(KBUILD_NOPEDANTIC),) 47ifeq ($(KBUILD_NOPEDANTIC),)
48 ifneq ("$(save-cflags)","$(CFLAGS)") 48 ifneq ("$(save-cflags)","$(CFLAGS)")
49 $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS) 49 $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y)
50 endif 50 endif
51endif 51endif
52 52
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index aeea84a24836..5d986d9adf1b 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -167,6 +167,7 @@ ifdef REGENERATE_PARSERS
167quiet_cmd_gperf = GPERF $@ 167quiet_cmd_gperf = GPERF $@
168 cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< 168 cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $<
169 169
170.PRECIOUS: $(src)/%.hash.c_shipped
170$(src)/%.hash.c_shipped: $(src)/%.gperf 171$(src)/%.hash.c_shipped: $(src)/%.gperf
171 $(call cmd,gperf) 172 $(call cmd,gperf)
172 173
@@ -177,6 +178,7 @@ LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy)
177quiet_cmd_flex = LEX $@ 178quiet_cmd_flex = LEX $@
178 cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< 179 cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $<
179 180
181.PRECIOUS: $(src)/%.lex.c_shipped
180$(src)/%.lex.c_shipped: $(src)/%.l 182$(src)/%.lex.c_shipped: $(src)/%.l
181 $(call cmd,flex) 183 $(call cmd,flex)
182 184
@@ -187,12 +189,14 @@ YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy)
187quiet_cmd_bison = YACC $@ 189quiet_cmd_bison = YACC $@
188 cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< 190 cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $<
189 191
192.PRECIOUS: $(src)/%.tab.c_shipped
190$(src)/%.tab.c_shipped: $(src)/%.y 193$(src)/%.tab.c_shipped: $(src)/%.y
191 $(call cmd,bison) 194 $(call cmd,bison)
192 195
193quiet_cmd_bison_h = YACC $@ 196quiet_cmd_bison_h = YACC $@
194 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< 197 cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $<
195 198
199.PRECIOUS: $(src)/%.tab.h_shipped
196$(src)/%.tab.h_shipped: $(src)/%.y 200$(src)/%.tab.h_shipped: $(src)/%.y
197 $(call cmd,bison_h) 201 $(call cmd,bison_h)
198 202
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 291228e25984..cb1f50cf12e3 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -345,6 +345,7 @@ static void parse_dep_file(void *map, size_t len)
345 memcpy(s, m, p-m); s[p-m] = 0; 345 memcpy(s, m, p-m); s[p-m] = 0;
346 if (strrcmp(s, "include/generated/autoconf.h") && 346 if (strrcmp(s, "include/generated/autoconf.h") &&
347 strrcmp(s, "arch/um/include/uml-config.h") && 347 strrcmp(s, "arch/um/include/uml-config.h") &&
348 strrcmp(s, "include/linux/kconfig.h") &&
348 strrcmp(s, ".ver")) { 349 strrcmp(s, ".ver")) {
349 /* 350 /*
350 * Do not list the source file as dependency, so that 351 * Do not list the source file as dependency, so that
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index 6d3fda0ce2ae..8a106499ec4f 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -40,7 +40,8 @@ static struct symbol *symtab[HASH_BUCKETS];
40static FILE *debugfile; 40static FILE *debugfile;
41 41
42int cur_line = 1; 42int cur_line = 1;
43char *cur_filename; 43char *cur_filename, *source_file;
44int in_source_file;
44 45
45static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types, 46static int flag_debug, flag_dump_defs, flag_reference, flag_dump_types,
46 flag_preserve, flag_warnings; 47 flag_preserve, flag_warnings;
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h
index 7ec52ae3846a..3bffdcaaa274 100644
--- a/scripts/genksyms/genksyms.h
+++ b/scripts/genksyms/genksyms.h
@@ -37,6 +37,7 @@ enum symbol_status {
37struct string_list { 37struct string_list {
38 struct string_list *next; 38 struct string_list *next;
39 enum symbol_type tag; 39 enum symbol_type tag;
40 int in_source_file;
40 char *string; 41 char *string;
41}; 42};
42 43
@@ -57,7 +58,8 @@ typedef struct string_list **yystype;
57#define YYSTYPE yystype 58#define YYSTYPE yystype
58 59
59extern int cur_line; 60extern int cur_line;
60extern char *cur_filename; 61extern char *cur_filename, *source_file;
62extern int in_source_file;
61 63
62struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact); 64struct symbol *find_symbol(const char *name, enum symbol_type ns, int exact);
63struct symbol *add_symbol(const char *name, enum symbol_type type, 65struct symbol *add_symbol(const char *name, enum symbol_type type,
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index 400ae06a70df..f770071719cb 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -116,6 +116,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
116 cur_node->tag = \ 116 cur_node->tag = \
117 find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\ 117 find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
118 SYM_ENUM_CONST : SYM_NORMAL ; \ 118 SYM_ENUM_CONST : SYM_NORMAL ; \
119 cur_node->in_source_file = in_source_file; \
119 } while (0) 120 } while (0)
120 121
121#define APP _APP(yytext, yyleng) 122#define APP _APP(yytext, yyleng)
@@ -166,6 +167,13 @@ repeat:
166 cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1); 167 cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
167