summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-10-08 18:30:23 +0200
committerNathan Chancellor <nathan@kernel.org>2026-10-08 18:30:23 +0200
commit20cb500b2dfd87e055b2a494665121d0c7d20f76 (patch)
tree1e4420aba7fb063859da1479872d594af574a914 /scripts
parent251653f815e102a0edce94a04677fe7e874881c8 (diff)
parent4b606bb09b5749aae80e94f3fe229283b52928ec (diff)
downloadlinux-next-20cb500b2dfd87e055b2a494665121d0c7d20f76.tar.gz
linux-next-20cb500b2dfd87e055b2a494665121d0c7d20f76.zip
Merge branch 'kbuild-next-speedups' into kbuild-for-next
* kbuild-next-speedups: kconfig: Improve ergonomics around disabling warnings with cc-option scripts/Kconfig.toolchain: Drop compiler symbols from dependencies Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kconfig.include2
-rw-r--r--scripts/Kconfig.toolchain22
2 files changed, 12 insertions, 12 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include
index 622d21e6953f..a7d9201acfcc 100644
--- a/scripts/Kconfig.include
+++ b/scripts/Kconfig.include
@@ -26,7 +26,7 @@ failure = $(if-success,$(1),n,y)
# $(cc-probe,<flag>)
# The command $(cc-option) and $(cc-option-str) test <flag> with. Not meant
# to be called directly; use one of those two instead.
-cc-probe = trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(CC) -Werror $(CLANG_FLAGS) $(1) -c -x c /dev/null -o .tmp_$$/tmp.o
+cc-probe = trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(CC) -Werror $(CLANG_FLAGS) $(shell,echo $(1) | sed "s;^-Wno-;-W;") -c -x c /dev/null -o .tmp_$$/tmp.o
# $(cc-option,<flag>)
# Return y if the compiler supports <flag>, n otherwise
diff --git a/scripts/Kconfig.toolchain b/scripts/Kconfig.toolchain
index c9d2aef4e355..b0b9a663ddbe 100644
--- a/scripts/Kconfig.toolchain
+++ b/scripts/Kconfig.toolchain
@@ -161,10 +161,10 @@ config CC_OPT_STRICT_FLEX_ARRAYS
# gcc-10 renamed --param=allow-store-data-races=0 to -fno-allow-store-data-races
config CC_OPT_ALLOW_STORE_DATA_RACES_PARAM
- def_string "$(cc-option-str,--param=allow-store-data-races=0)" if CC_IS_GCC
+ def_string "$(cc-option-str,--param=allow-store-data-races=0)"
config CC_OPT_NO_ALLOW_STORE_DATA_RACES
- def_string "$(cc-option-str,-fno-allow-store-data-races)" if CC_IS_GCC
+ def_string "$(cc-option-str,-fno-allow-store-data-races)"
config CC_HAS_MNOP_MCOUNT
def_bool $(cc-option,-mnop-mcount)
@@ -180,19 +180,19 @@ config LD_OPT_NO_WARN_RWX_SEGMENTS
def_string "$(ld-option-str,--no-warn-rwx-segments)"
config CC_OPT_WNO_ADDRESS_OF_PACKED_MEMBER
- def_string "-Wno-address-of-packed-member" if $(cc-option,-Waddress-of-packed-member)
+ def_string "$(cc-option-str,-Wno-address-of-packed-member)"
config CC_OPT_WNO_FORMAT_OVERFLOW_NON_KPRINTF
- def_string "-Wno-format-overflow-non-kprintf" if CC_IS_CLANG && $(cc-option,-Wformat-overflow-non-kprintf)
+ def_string "$(cc-option-str,-Wno-format-overflow-non-kprintf)"
config CC_OPT_WNO_FORMAT_TRUNCATION_NON_KPRINTF
- def_string "-Wno-format-truncation-non-kprintf" if CC_IS_CLANG && $(cc-option,-Wformat-truncation-non-kprintf)
+ def_string "$(cc-option-str,-Wno-format-truncation-non-kprintf)"
config CC_OPT_WNO_DEFAULT_CONST_INIT_UNSAFE
- def_string "-Wno-default-const-init-unsafe" if CC_IS_CLANG && $(cc-option,-Wdefault-const-init-unsafe)
+ def_string "$(cc-option-str,-Wno-default-const-init-unsafe)"
config CC_OPT_WNO_DANGLING_POINTER
- def_string "-Wno-dangling-pointer" if $(cc-option,-Wdangling-pointer)
+ def_string "$(cc-option-str,-Wno-dangling-pointer)"
config CC_OPT_WVLA_LARGER_THAN
def_string "$(cc-option-str,-Wvla-larger-than=1)"
@@ -201,7 +201,7 @@ config CC_HAS_WSTRINGOP_OVERFLOW
def_bool $(cc-option,-Wstringop-overflow)
config CC_OPT_WNO_UNTERMINATED_STRING_INITIALIZATION
- def_string "-Wno-unterminated-string-initialization" if $(cc-option,-Wunterminated-string-initialization)
+ def_string "$(cc-option-str,-Wno-unterminated-string-initialization)"
config CC_OPT_WERROR_DESIGNATED_INIT
def_string "$(cc-option-str,-Werror=designated-init)"
@@ -210,13 +210,13 @@ config CC_OPT_WENUM_CONVERSION
def_string "$(cc-option-str,-Wenum-conversion)"
config CC_OPT_WNO_PACKED_NOT_ALIGNED
- def_string "-Wno-packed-not-aligned" if $(cc-option,-Wpacked-not-aligned)
+ def_string "$(cc-option-str,-Wno-packed-not-aligned)"
config CC_OPT_WNO_FORMAT_OVERFLOW
- def_string "-Wno-format-overflow" if $(cc-option,-Wformat-overflow)
+ def_string "$(cc-option-str,-Wno-format-overflow)"
config CC_OPT_WNO_STRINGOP_TRUNCATION
- def_string "-Wno-stringop-truncation" if $(cc-option,-Wstringop-truncation)
+ def_string "$(cc-option-str,-Wno-stringop-truncation)"
config CC_HAS_COUNTED_BY
bool