diff options
| author | Kees Cook <kees@kernel.org> | 2026-09-18 17:59:26 -0700 |
|---|---|---|
| committer | Nathan Chancellor <nathan@kernel.org> | 2026-09-24 11:37:05 -0400 |
| commit | 889a621272f9b7e19f35efa3d836347b4e209290 (patch) | |
| tree | 3ddd9a23272ccac82404540e808c96364e6ff345 /tools/lib/python/kdoc/python_version.py | |
| parent | 651fb291c4c86b7be96720b129ef4619fbcef53c (diff) | |
| download | linux-next-889a621272f9b7e19f35efa3d836347b4e209290.tar.gz linux-next-889a621272f9b7e19f35efa3d836347b4e209290.zip | |
kconfig: Replace "cc-option-bit" with "cc-option-str"
$(cc-option-bit) returns the flag it was given when the compiler accepts
it, and an empty string otherwise. It was originally only used
internally for machine bit flags, but it is generally useful[1].
Rename it to $(cc-option-str), which says what it returns rather than
what it was first used for, and extract the probe logic from the existing
$(cc-option) macro to reuse it. Additionally add support for an optional
fallback, much like the Kbuild cc-option macro. This can be used as:
config CC_OPT_FOO
def_string "$(cc-option-str,-fnew-option,-fold-option)"
If the fallback is omitted, it is just an empty string.
Build tested ARCH=x86_64 defconfig with GCC 16.2.0.
Assisted-by: LLM
Signed-off-by: Kees Cook <kees@kernel.org>
Tested-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Julian Braha <julianbraha@gmail.com>
Link: https://patch.msgid.link/20260919005929.4077729-2-kees@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
