diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 12:45:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-20 12:45:43 -0500 |
commit | d9569f003cfc0228e132749ae6fd81cb29dc6c70 (patch) | |
tree | 13700ad267a40c318a8d36356c8f5b25e98854fb /scripts | |
parent | 0cf0305fffcf8df0998b70d0e922b7a3a5976182 (diff) | |
parent | 7599ea8b4e25fd8dea26cb64f100cf265d1e6bf3 (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
- Make <modname>-m in makefiles work like <modname>-y and fix the
fallout
- Minor genksyms fix
- Fix race with make -j install modules_install
- Move -Wsign-compare from make W=1 to W=2
- Other minor fixes
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Demote 'sign-compare' warning to W=2
Makefile: revert "Makefile: Document ability to make file.lst and file.S" partially
kbuild: Do not run modules_install and install in paralel
genksyms: Handle string literals with spaces in reference files
fixdep: constify strrcmp arguments
ath10k: Fix build with CONFIG_THERMAL=m
Revert "drm: Hack around CONFIG_AGP=m build failures"
kbuild: Allow to specify composite modules with modname-m
staging/ad7606: Actually build the interface modules
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 8 | ||||
-rw-r--r-- | scripts/Makefile.extrawarn | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 4 | ||||
-rw-r--r-- | scripts/basic/fixdep.c | 2 | ||||
-rw-r--r-- | scripts/genksyms/genksyms.c | 6 |
5 files changed, 15 insertions, 7 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 01df30af4d4a..2c47f9c305aa 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -372,10 +372,14 @@ endif | |||
372 | # <composite-object>-objs := <list of .o files> | 372 | # <composite-object>-objs := <list of .o files> |
373 | # or | 373 | # or |
374 | # <composite-object>-y := <list of .o files> | 374 | # <composite-object>-y := <list of .o files> |
375 | # or | ||
376 | # <composite-object>-m := <list of .o files> | ||
377 | # The -m syntax only works if <composite object> is a module | ||
375 | link_multi_deps = \ | 378 | link_multi_deps = \ |
376 | $(filter $(addprefix $(obj)/, \ | 379 | $(filter $(addprefix $(obj)/, \ |
377 | $($(subst $(obj)/,,$(@:.o=-objs))) \ | 380 | $($(subst $(obj)/,,$(@:.o=-objs))) \ |
378 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) | 381 | $($(subst $(obj)/,,$(@:.o=-y))) \ |
382 | $($(subst $(obj)/,,$(@:.o=-m)))), $^) | ||
379 | 383 | ||
380 | quiet_cmd_link_multi-y = LD $@ | 384 | quiet_cmd_link_multi-y = LD $@ |
381 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) | 385 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) |
@@ -390,7 +394,7 @@ $(call multi_depend, $(multi-used-y), .o, -objs -y) | |||
390 | $(multi-used-m): FORCE | 394 | $(multi-used-m): FORCE |
391 | $(call if_changed,link_multi-m) | 395 | $(call if_changed,link_multi-m) |
392 | @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) | 396 | @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) |
393 | $(call multi_depend, $(multi-used-m), .o, -objs -y) | 397 | $(call multi_depend, $(multi-used-m), .o, -objs -y -m) |
394 | 398 | ||
395 | targets += $(multi-used-y) $(multi-used-m) | 399 | targets += $(multi-used-y) $(multi-used-m) |
396 | 400 | ||
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 4efedcbe4165..f9e47a70509c 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn | |||
@@ -25,6 +25,7 @@ warning-1 += -Wold-style-definition | |||
25 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | 25 | warning-1 += $(call cc-option, -Wmissing-include-dirs) |
26 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | 26 | warning-1 += $(call cc-option, -Wunused-but-set-variable) |
27 | warning-1 += $(call cc-disable-warning, missing-field-initializers) | 27 | warning-1 += $(call cc-disable-warning, missing-field-initializers) |
28 | warning-1 += $(call cc-disable-warning, sign-compare) | ||
28 | 29 | ||
29 | warning-2 := -Waggregate-return | 30 | warning-2 := -Waggregate-return |
30 | warning-2 += -Wcast-align | 31 | warning-2 += -Wcast-align |
@@ -33,6 +34,7 @@ warning-2 += -Wnested-externs | |||
33 | warning-2 += -Wshadow | 34 | warning-2 += -Wshadow |
34 | warning-2 += $(call cc-option, -Wlogical-op) | 35 | warning-2 += $(call cc-option, -Wlogical-op) |
35 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | 36 | warning-2 += $(call cc-option, -Wmissing-field-initializers) |
37 | warning-2 += $(call cc-option, -Wsign-compare) | ||
36 | 38 | ||
37 | warning-3 := -Wbad-function-cast | 39 | warning-3 := -Wbad-function-cast |
38 | warning-3 += -Wcast-qual | 40 | warning-3 += -Wcast-qual |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 26a48d76eb9d..39d6bb18ce76 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -48,7 +48,7 @@ subdir-ym := $(sort $(subdir-y) $(subdir-m)) | |||
48 | 48 | ||
49 | # if $(foo-objs) exists, foo.o is a composite object | 49 | # if $(foo-objs) exists, foo.o is a composite object |
50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))), $(m)))) |
52 | multi-used := $(multi-used-y) $(multi-used-m) | 52 | multi-used := $(multi-used-y) $(multi-used-m) |
53 | single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) | 53 | single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) |
54 | 54 | ||
@@ -67,7 +67,7 @@ obj-dirs := $(dir $(multi-objs) $(obj-y)) | |||
67 | 67 | ||
68 | # Replace multi-part objects by their individual parts, look at local dir only | 68 | # Replace multi-part objects by their individual parts, look at local dir only |
69 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) | 69 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) |
70 | real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) | 70 | real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m))),$($(m:.o=-objs)) $($(m:.o=-y)) $($(m:.o=-m)),$(m))) |
71 | 71 | ||
72 | # Add subdir path | 72 | # Add subdir path |
73 | 73 | ||
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index c68fd61fdc42..5b327c67a828 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c | |||
@@ -251,7 +251,7 @@ static void parse_config_file(const char *map, size_t len) | |||
251 | } | 251 | } |
252 | 252 | ||
253 | /* test is s ends in sub */ | 253 | /* test is s ends in sub */ |
254 | static int strrcmp(char *s, char *sub) | 254 | static int strrcmp(const char *s, const char *sub) |
255 | { | 255 | { |
256 | int slen = strlen(s); | 256 | int slen = strlen(s); |
257 | int sublen = strlen(sub); | 257 | int sublen = strlen(sub); |
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c index 88632df4381b..dafaf96e0a34 100644 --- a/scripts/genksyms/genksyms.c +++ b/scripts/genksyms/genksyms.c | |||
@@ -423,13 +423,15 @@ static struct string_list *read_node(FILE *f) | |||
423 | struct string_list node = { | 423 | struct string_list node = { |
424 | .string = buffer, | 424 | .string = buffer, |
425 | .tag = SYM_NORMAL }; | 425 | .tag = SYM_NORMAL }; |
426 | int c; | 426 | int c, in_string = 0; |
427 | 427 | ||
428 | while ((c = fgetc(f)) != EOF) { | 428 | while ((c = fgetc(f)) != EOF) { |
429 | if (c == ' ') { | 429 | if (!in_string && c == ' ') { |
430 | if (node.string == buffer) | 430 | if (node.string == buffer) |
431 | continue; | 431 | continue; |
432 | break; | 432 | break; |
433 | } else if (c == '"') { | ||
434 | in_string = !in_string; | ||
433 | } else if (c == '\n') { | 435 | } else if (c == '\n') { |
434 | if (node.string == buffer) | 436 | if (node.string == buffer) |
435 | return NULL; | 437 | return NULL; |