diff options
| author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-11-14 14:43:57 +0100 |
|---|---|---|
| committer | Nicolas Schier <nsc@kernel.org> | 2025-11-14 20:20:34 +0100 |
| commit | 80623f2c83d7de5c289d4240b8f4cef4103c51fc (patch) | |
| tree | 81b1ffedd7931d1c6c8b842604c56cc752b3089a /scripts | |
| parent | d81d9d389b9b73acd68f300c8889c7fa1acd4977 (diff) | |
init: deduplicate cc-can-link.sh invocations
The command to invoke scripts/cc-can-link.sh is very long and new usages
are about to be added.
Add a helper variable to make the code easier to read and maintain.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Nicolas Schier <nsc@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://patch.msgid.link/20251114-kbuild-userprogs-bits-v3-2-4dee0d74d439@linutronix.de
Signed-off-by: Nicolas Schier <nsc@kernel.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/Kconfig.include | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/Kconfig.include b/scripts/Kconfig.include index 33193ca6e803..d42042b6c9e2 100644 --- a/scripts/Kconfig.include +++ b/scripts/Kconfig.include @@ -65,6 +65,9 @@ cc-option-bit = $(if-success,$(CC) -Werror $(1) -E -x c /dev/null -o /dev/null,$ m32-flag := $(cc-option-bit,-m32) m64-flag := $(cc-option-bit,-m64) +# Test whether the compiler can link userspace applications +cc_can_link_user = $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(1)) + rustc-version := $(shell,$(srctree)/scripts/rustc-version.sh $(RUSTC)) rustc-llvm-version := $(shell,$(srctree)/scripts/rustc-llvm-version.sh $(RUSTC)) |