Commit bb9b8fd2 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v4.12-2' of...

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()
parents f65013d6 ad818106
...@@ -1437,7 +1437,7 @@ help: ...@@ -1437,7 +1437,7 @@ help:
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target' @echo ' make V=2 [targets] 2 => give reason for rebuild of target'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config' @echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)' @echo ' make C=1 [targets] Check re-compiled c source with $$CHECK (sparse by default)'
@echo ' make C=2 [targets] Force check of all c source with $$CHECK' @echo ' make C=2 [targets] Force check of all c source with $$CHECK'
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections' @echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
@echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where' @echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
......
...@@ -14,7 +14,15 @@ __headers: ...@@ -14,7 +14,15 @@ __headers:
include scripts/Kbuild.include include scripts/Kbuild.include
srcdir := $(srctree)/$(obj) srcdir := $(srctree)/$(obj)
subdirs := $(patsubst $(srcdir)/%/.,%,$(wildcard $(srcdir)/*/.))
# When make is run under a fakechroot environment, the function
# $(wildcard $(srcdir)/*/.) doesn't only return directories, but also regular
# files. So, we are using a combination of sort/dir/wildcard which works
# with fakechroot.
subdirs := $(patsubst $(srcdir)/%/,%,\
$(filter-out $(srcdir)/,\
$(sort $(dir $(wildcard $(srcdir)/*/)))))
# caller may set destination dir (when installing to asm/) # caller may set destination dir (when installing to asm/)
_dst := $(if $(dst),$(dst),$(obj)) _dst := $(if $(dst),$(dst),$(obj))
......
...@@ -75,7 +75,7 @@ struct string_list *copy_list_range(struct string_list *start, ...@@ -75,7 +75,7 @@ struct string_list *copy_list_range(struct string_list *start,
int yylex(void); int yylex(void);
int yyparse(void); int yyparse(void);
void error_with_pos(const char *, ...); void error_with_pos(const char *, ...) __attribute__ ((format(printf, 1, 2)));
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
#define xmalloc(size) ({ void *__ptr = malloc(size); \ #define xmalloc(size) ({ void *__ptr = malloc(size); \
......
...@@ -196,7 +196,7 @@ clean-files += config.pot linux.pot ...@@ -196,7 +196,7 @@ clean-files += config.pot linux.pot
# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) # Check that we have the required ncurses stuff installed for lxdialog (menuconfig)
PHONY += $(obj)/dochecklxdialog PHONY += $(obj)/dochecklxdialog
$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/dochecklxdialog
$(obj)/dochecklxdialog: $(obj)/dochecklxdialog:
$(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
......
...@@ -271,7 +271,7 @@ static struct mitem k_menu_items[MAX_MENU_ITEMS]; ...@@ -271,7 +271,7 @@ static struct mitem k_menu_items[MAX_MENU_ITEMS];
static int items_num; static int items_num;
static int global_exit; static int global_exit;
/* the currently selected button */ /* the currently selected button */
const char *current_instructions = menu_instructions; static const char *current_instructions = menu_instructions;
static char *dialog_input_result; static char *dialog_input_result;
static int dialog_input_result_len; static int dialog_input_result_len;
...@@ -305,7 +305,7 @@ struct function_keys { ...@@ -305,7 +305,7 @@ struct function_keys {
}; };
static const int function_keys_num = 9; static const int function_keys_num = 9;
struct function_keys function_keys[] = { static struct function_keys function_keys[] = {
{ {
.key_str = "F1", .key_str = "F1",
.func = "Help", .func = "Help",
...@@ -508,7 +508,7 @@ static int get_mext_match(const char *match_str, match_f flag) ...@@ -508,7 +508,7 @@ static int get_mext_match(const char *match_str, match_f flag)
index = (index + items_num) % items_num; index = (index + items_num) % items_num;
while (true) { while (true) {
char *str = k_menu_items[index].str; char *str = k_menu_items[index].str;
if (strcasestr(str, match_str) != 0) if (strcasestr(str, match_str) != NULL)
return index; return index;
if (flag == FIND_NEXT_MATCH_UP || if (flag == FIND_NEXT_MATCH_UP ||
flag == MATCH_TINKER_PATTERN_UP) flag == MATCH_TINKER_PATTERN_UP)
...@@ -1067,7 +1067,7 @@ static int do_match(int key, struct match_state *state, int *ans) ...@@ -1067,7 +1067,7 @@ static int do_match(int key, struct match_state *state, int *ans)
static void conf(struct menu *menu) static void conf(struct menu *menu)
{ {
struct menu *submenu = 0; struct menu *submenu = NULL;
const char *prompt = menu_get_prompt(menu); const char *prompt = menu_get_prompt(menu);
struct symbol *sym; struct symbol *sym;
int res; int res;
...@@ -1234,7 +1234,7 @@ static void show_help(struct menu *menu) ...@@ -1234,7 +1234,7 @@ static void show_help(struct menu *menu)
static void conf_choice(struct menu *menu) static void conf_choice(struct menu *menu)
{ {
const char *prompt = _(menu_get_prompt(menu)); const char *prompt = _(menu_get_prompt(menu));
struct menu *child = 0; struct menu *child = NULL;
struct symbol *active; struct symbol *active;
int selected_index = 0; int selected_index = 0;
int last_top_row = 0; int last_top_row = 0;
...@@ -1456,7 +1456,7 @@ static void conf_save(void) ...@@ -1456,7 +1456,7 @@ static void conf_save(void)
} }
} }
void setup_windows(void) static void setup_windows(void)
{ {
int lines, columns; int lines, columns;
......
...@@ -129,7 +129,7 @@ static void no_colors_theme(void) ...@@ -129,7 +129,7 @@ static void no_colors_theme(void)
mkattrn(FUNCTION_TEXT, A_REVERSE); mkattrn(FUNCTION_TEXT, A_REVERSE);
} }
void set_colors() void set_colors(void)
{ {
start_color(); start_color();
use_default_colors(); use_default_colors();
...@@ -192,7 +192,7 @@ const char *get_line(const char *text, int line_no) ...@@ -192,7 +192,7 @@ const char *get_line(const char *text, int line_no)
int lines = 0; int lines = 0;
if (!text) if (!text)
return 0; return NULL;
for (i = 0; text[i] != '\0' && lines < line_no; i++) for (i = 0; text[i] != '\0' && lines < line_no; i++)
if (text[i] == '\n') if (text[i] == '\n')
......
...@@ -106,6 +106,7 @@ all_compiled_sources() ...@@ -106,6 +106,7 @@ all_compiled_sources()
case "$i" in case "$i" in
*.[cS]) *.[cS])
j=${i/\.[cS]/\.o} j=${i/\.[cS]/\.o}
j="${j#$tree}"
if [ -e $j ]; then if [ -e $j ]; then
echo $i echo $i
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment