HomeFreeBSD

Add support for $KERNEL_{CC,LD,LLVM} variables

Description

Add support for $KERNEL_{CC,LD,LLVM} variables

Currently, $(CC), $(LD), and $(LLVM) variables aren't passed to kbuild
while building modules. This causes modules to build with the default
GNU GCC toolchain and prevents experimenting with other toolchains such
as CLANG/LLVM. It can also lead to build failure if the CFLAGS/LDFLAGS
passed are incompatible with gcc/ld.

Pass $KERNEL_CC, $KERNEL_LD, and $KERNEL_LLVM as $(CC), $(LD), and
$(LLVM), respectively, to kbuild for each that is defined in the
environment. This should take care of the majority of alternative
toolchain use cases.

Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Closes #13046

Details

Provenance
Peter Levine <plevine457@gmail.com>Authored on Feb 2 2022, 5:44 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 9 2022, 9:24 PM
Parents
rG8e94ac0e36c5: Linux 5.16 compat: don't use XSTATE_XSAVE to save FPU state
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb66140c6ad48: Add support for $KERNEL_{CC,LD,LLVM} variables (authored by Peter Levine <plevine457@gmail.com>).Feb 9 2022, 9:24 PM