Skip to content

Conversation

jserv
Copy link
Contributor

@jserv jserv commented Oct 13, 2025

This implements 9 Kbuild preprocessor functions for toolchain capability detection, enabling parsing of modern Linux kernel Kconfig files (since version 4.18):

  • success/failure/if-success: Shell command result testing
  • cc-option/cc-option-bit: C compiler flag support detection
  • ld-option: Linker option support detection
  • as-instr/as-option: Assembler capability detection
  • rustc-option: Rust compiler option detection

This resolves parsing errors when processing kernel Kconfig files that use toolchain detection macros like $(as-instr,tpause %ecx) and nested function calls like $(success,test -z "\$(shell,...)").

This implements 9 Kbuild preprocessor functions for toolchain capability
detection, enabling parsing of modern Linux kernel Kconfig files (since
version 4.18):
- success/failure/if-success: Shell command result testing
- cc-option/cc-option-bit: C compiler flag support detection
- ld-option: Linker option support detection
- as-instr/as-option: Assembler capability detection
- rustc-option: Rust compiler option detection

This resolves parsing errors when processing kernel Kconfig files that
use toolchain detection macros like \$(as-instr,tpause %ecx) and nested
function calls like \$(success,test -z "\$(shell,...)").
@jserv jserv merged commit e1f15e3 into main Oct 13, 2025
9 checks passed
@jserv jserv deleted the kbuild branch October 13, 2025 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant