aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-06-24 19:18:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-06-24 19:18:00 -0400
commitbb9b8fd26b50c9ec822805b9d877bec9d88acff4 (patch)
tree64e562f6a22a13fc3b63f2f9289ca688c50ad52b
parentf65013d655ac9639f37d3b54189f6468f672e60b (diff)
parentad8181060788c80c0ad75b583f24c22fa962a7a6 (diff)
Merge tag 'kbuild-fixes-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: "Nothing scary, just some random fixes: - fix warnings of host programs - fix "make tags" when COMPILED_SOURCE=1 is specified along with O= - clarify help message of C=1 option - fix dependency for ncurses compatibility check - fix "make headers_install" for fakechroot environment" * tag 'kbuild-fixes-v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: fix sparse warnings in nconfig kbuild: fix header installation under fakechroot environment kconfig: Check for libncurses before menuconfig Kbuild: tiny correction on `make help` tags: honor COMPILED_SOURCE with apart output directory genksyms: add printf format attribute to error_with_pos()
-rw-r--r--Makefile2
-rw-r--r--scripts/Makefile.headersinst10
-rw-r--r--scripts/genksyms/genksyms.h2
-rw-r--r--scripts/kconfig/Makefile2
-rw-r--r--scripts/kconfig/nconf.c12
-rw-r--r--scripts/kconfig/nconf.gui.c4
-rwxr-xr-xscripts/tags.sh1
7 files changed, 21 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index e40c471abe29..57df7569c1bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1437,7 +1437,7 @@ help:
1437 @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' 1437 @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
1438 @echo ' make V=2 [targets] 2 => give reason for rebuild of target' 1438 @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
1439 @echo ' make O=dir [targets] Locate all output files in "dir", including .config' 1439 @echo ' make O=dir [targets] Locate all output files in "dir", including .config'
1440 @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' 1440 @echo ' make C=1 [targets] Check re-compiled c source with $$CHECK (sparse by default)'
1441 @echo ' make C=2 [targets] Force check of all c source with $$CHECK' 1441 @echo ' make C=2 [targets] Force check of all c source with $$CHECK'
1442 @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' 1442 @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
1443 @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where' 1443 @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index ce753a408c56..c583a1e1bd3c 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -14,7 +14,15 @@ __headers:
14include scripts/Kbuild.include 14include scripts/Kbuild.include
15 15
16srcdir := $(srctree)/$(obj) 16srcdir := $(srctree)/$(obj)
17subdirs := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.)) 17
18# When make is run under a fakechroot environment, the function
19# $(wildcard $(srcdir)/*/.) doesn't only return directories, but also regular
20# files. So, we are using a combination of sort/dir/wildcard which works
21# with fakechroot.
22subdirs := $(patsubst $(srcdir)/%/,%,\
23 $(filter-out $(srcdir)/,\
24 $(sort $(dir $(wildcard $(srcdir)/*/)))))
25
18# caller may set destination dir (when installing to asm/) 26# caller may set destination dir (when installing to asm/)
19_dst := $(if $(dst),$(dst),$(obj)) 27_dst := $(if $(dst),$(dst),$(obj))
20 28
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h
index 3bffdcaaa274..b724a0290c75 100644
--- a/scripts/genksyms/genksyms.h
+++ b/scripts/genksyms/genksyms.h
@@ -75,7 +75,7 @@ struct string_list *copy_list_range(struct string_list *start,
75int yylex(void); 75int yylex(void);
76int yyparse(void); 76int yyparse(void);
77 77
78void error_with_pos(const char *, ...); 78void error_with_pos(const char *, ...) __attribute__ ((format(printf, 1, 2)));
79 79
80/*----------------------------------------------------------------------*/ 80/*----------------------------------------------------------------------*/
81#define xmalloc(size) ({ void *__ptr = malloc(size); \ 81#define xmalloc(size) ({ void *__ptr = malloc(size); \
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 90a091b6ae4d..eb8144643b78 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -196,7 +196,7 @@ clean-files += config.pot linux.pot
196 196
197# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) 197# Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
198PHONY += $(obj)/dochecklxdialog 198PHONY += $(obj)/dochecklxdialog
199$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog 199$(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog
200$(obj)/dochecklxdialog: 200$(obj)/dochecklxdialog:
201 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) 201 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
202 202
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index a9bc5334a478..003114779815 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -271,7 +271,7 @@ static struct mitem k_menu_items[MAX_MENU_ITEMS];
271static int items_num; 271static int items_num;
272static int global_exit; 272static int global_exit;
273/* the currently selected button */ 273/* the currently selected button */
274const char *current_instructions = menu_instructions; 274static const char *current_instructions = menu_instructions;
275 275
276static char *dialog_input_result; 276static char *dialog_input_result;
277static int dialog_input_result_len; 277static int dialog_input_result_len;
@@ -305,7 +305,7 @@ struct function_keys {
305}; 305};
306 306
307static const int function_keys_num = 9; 307static const int function_keys_num = 9;
308struct function_keys function_keys[] = { 308static struct function_keys function_keys[] = {
309 { 309 {
310 .key_str = "F1", 310 .key_str = "F1",
311 .func = "Help", 311 .func = "Help",
@@ -508,7 +508,7 @@ static int get_mext_match(const char *match_str, match_f flag)
508 index = (index + items_num) % items_num; 508 index = (index + items_num) % items_num;
509 while (true) { 509 while (true) {
510 char *str = k_menu_items[index].str; 510 char *str = k_menu_items[index].str;
511 if (strcasestr(str, match_str) != 0) 511 if (strcasestr(str, match_str) != NULL)
512 return index; 512 return index;
513 if (flag == FIND_NEXT_MATCH_UP || 513 if (flag == FIND_NEXT_MATCH_UP ||
514 flag == MATCH_TINKER_PATTERN_UP) 514 flag == MATCH_TINKER_PATTERN_UP)
@@ -1067,7 +1067,7 @@ static int do_match(int key, struct match_state *state, int *ans)
1067 1067
1068static void conf(struct menu *menu) 1068static void conf(struct menu *menu)
1069{ 1069{
1070 struct menu *submenu = 0; 1070 struct menu *submenu = NULL;
1071 const char *prompt = menu_get_prompt(menu); 1071 const char *prompt = menu_get_prompt(menu);
1072 struct symbol *sym; 1072 struct symbol *sym;
1073 int res; 1073 int res;
@@ -1234,7 +1234,7 @@ static void show_help(struct menu *menu)
1234static void conf_choice(struct menu *menu) 1234static void conf_choice(struct menu *menu)
1235{ 1235{
1236 const char *prompt = _(menu_get_prompt(menu)); 1236 const char *prompt = _(menu_get_prompt(menu));
1237 struct menu *child = 0; 1237 struct menu *child = NULL;
1238 struct symbol *active; 1238 struct symbol *active;
1239 int selected_index = 0; 1239 int selected_index = 0;
1240 int last_top_row = 0; 1240 int last_top_row = 0;
@@ -1456,7 +1456,7 @@ static void conf_save(void)
1456 } 1456 }
1457} 1457}
1458 1458
1459void setup_windows(void) 1459static void setup_windows(void)
1460{ 1460{
1461 int lines, columns; 1461 int lines, columns;
1462 1462
diff --git a/scripts/kconfig/nconf.gui.c b/scripts/kconfig/nconf.gui.c
index 4b2f44c20caf..a64b1c31253e 100644
--- a/scripts/kconfig/nconf.gui.c
+++ b/scripts/kconfig/nconf.gui.c
@@ -129,7 +129,7 @@ static void no_colors_theme(void)
129 mkattrn(FUNCTION_TEXT, A_REVERSE); 129 mkattrn(FUNCTION_TEXT, A_REVERSE);
130} 130}
131 131
132void set_colors() 132void set_colors(void)
133{ 133{
134 start_color(); 134 start_color();
135 use_default_colors(); 135 use_default_colors();
@@ -192,7 +192,7 @@ const char *get_line(const char *text, int line_no)
192 int lines = 0; 192 int lines = 0;
193 193
194 if (!text) 194 if (!text)
195 return 0; 195 return NULL;
196 196
197 for (i = 0; text[i] != '\0' && lines < line_no; i++) 197 for (i = 0; text[i] != '\0' && lines < line_no; i++)
198 if (text[i] == '\n') 198 if (text[i] == '\n')
diff --git a/scripts/tags.sh b/scripts/tags.sh
index d661f2f3ef61..d23dcbf17457 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -106,6 +106,7 @@ all_compiled_sources()
106 case "$i" in 106 case "$i" in
107 *.[cS]) 107 *.[cS])
108 j=${i/\.[cS]/\.o} 108 j=${i/\.[cS]/\.o}
109 j="${j#$tree}"
109 if [ -e $j ]; then 110 if [ -e $j ]; then
110 echo $i 111 echo $i
111 fi 112 fi