diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-30 16:05:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-30 16:05:30 -0400 |
commit | 22d3e0c36e10296da91e3bb8826592bacfbf4b9c (patch) | |
tree | 6148e2c2d60a255c33fffaf13f8eb48a42288445 /scripts | |
parent | 0fbc4aeabc91f2e39e0dffebe8f81a0eb3648d97 (diff) | |
parent | 73d1c580f92b203f4c3a189ee98c917c65712f7e (diff) |
Merge tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- introduce __diag_* macros and suppress -Wattribute-alias warnings
from GCC 8
- fix stack protector test script for x86_64
- fix line number handling in Kconfig
- document that '#' starts a comment in Kconfig
- handle P_SYMBOL property in dump debugging of Kconfig
- correct help message of LD_DEAD_CODE_DATA_ELIMINATION
- fix occasional segmentation faults in Kconfig
* tag 'kbuild-fixes-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: loop boundary condition fix
kbuild: reword help of LD_DEAD_CODE_DATA_ELIMINATION
kconfig: handle P_SYMBOL in print_symbol()
kconfig: document Kconfig source file comments
kconfig: fix line numbers for if-entries in menu tree
stack-protector: Fix test with 32-bit userland and CONFIG_64BIT=y
powerpc: Remove -Wattribute-alias pragmas
disable -Wattribute-alias warning for SYSCALL_DEFINEx()
kbuild: add macro for controlling warnings to linux/compiler.h
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/gcc-x86_64-has-stack-protector.sh | 2 | ||||
-rw-r--r-- | scripts/kconfig/expr.h | 3 | ||||
-rw-r--r-- | scripts/kconfig/preprocess.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/zconf.y | 8 |
4 files changed, 11 insertions, 4 deletions
diff --git a/scripts/gcc-x86_64-has-stack-protector.sh b/scripts/gcc-x86_64-has-stack-protector.sh index 3755af0cd9f7..75e4e22b986a 100755 --- a/scripts/gcc-x86_64-has-stack-protector.sh +++ b/scripts/gcc-x86_64-has-stack-protector.sh | |||
@@ -1,4 +1,4 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # SPDX-License-Identifier: GPL-2.0 | 2 | # SPDX-License-Identifier: GPL-2.0 |
3 | 3 | ||
4 | echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs" | 4 | echo "int foo(void) { char X[200]; return 3; }" | $* -S -x c -c -m64 -O0 -mcmodel=kernel -fno-PIE -fstack-protector - -o - 2> /dev/null | grep -q "%gs" |
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 94a383b21df6..f63b41b0dd49 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h | |||
@@ -171,6 +171,9 @@ struct symbol { | |||
171 | * config BAZ | 171 | * config BAZ |
172 | * int "BAZ Value" | 172 | * int "BAZ Value" |
173 | * range 1..255 | 173 | * range 1..255 |
174 | * | ||
175 | * Please, also check zconf.y:print_symbol() when modifying the | ||
176 | * list of property types! | ||
174 | */ | 177 | */ |
175 | enum prop_type { | 178 | enum prop_type { |
176 | P_UNKNOWN, | 179 | P_UNKNOWN, |
diff --git a/scripts/kconfig/preprocess.c b/scripts/kconfig/preprocess.c index 65da87fce907..5ca2df790d3c 100644 --- a/scripts/kconfig/preprocess.c +++ b/scripts/kconfig/preprocess.c | |||
@@ -156,7 +156,7 @@ static char *do_shell(int argc, char *argv[]) | |||
156 | nread--; | 156 | nread--; |
157 | 157 | ||
158 | /* remove trailing new lines */ | 158 | /* remove trailing new lines */ |
159 | while (buf[nread - 1] == '\n') | 159 | while (nread > 0 && buf[nread - 1] == '\n') |
160 | nread--; | 160 | nread--; |
161 | 161 | ||
162 | buf[nread] = 0; | 162 | buf[nread] = 0; |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index 6f9b0aa32a82..4b68272ebdb9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE]; | |||
31 | static struct menu *current_menu, *current_entry; | 31 | static struct menu *current_menu, *current_entry; |
32 | 32 | ||
33 | %} | 33 | %} |
34 | %expect 32 | 34 | %expect 31 |
35 | 35 | ||
36 | %union | 36 | %union |
37 | { | 37 | { |
@@ -337,7 +337,7 @@ choice_block: | |||
337 | 337 | ||
338 | /* if entry */ | 338 | /* if entry */ |
339 | 339 | ||
340 | if_entry: T_IF expr nl | 340 | if_entry: T_IF expr T_EOL |
341 | { | 341 | { |
342 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); | 342 | printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); |
343 | menu_add_entry(NULL); | 343 | menu_add_entry(NULL); |
@@ -717,6 +717,10 @@ static void print_symbol(FILE *out, struct menu *menu) | |||
717 | print_quoted_string(out, prop->text); | 717 | print_quoted_string(out, prop->text); |
718 | fputc('\n', out); | 718 | fputc('\n', out); |
719 | break; | 719 | break; |
720 | case P_SYMBOL: | ||
721 | fputs( " symbol ", out); | ||
722 | fprintf(out, "%s\n", prop->sym->name); | ||
723 | break; | ||
720 | default: | 724 | default: |
721 | fprintf(out, " unknown prop %d!\n", prop->type); | 725 | fprintf(out, " unknown prop %d!\n", prop->type); |
722 | break; | 726 | break; |