Support for cross-compiling kernel modules

In order to correctly cross-compile, one has to pass ARCH and
CROSS_COMPILE make flags to kernel module build calls. Facilitate this
in the same way as for custom CC flag by recognizing KERNEL_-prefixed
configure environment variables of same name.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Closes #16924
This commit is contained in:
n0-1
2025-01-06 02:27:19 +01:00
committed by Brian Behlendorf
parent 9f1c5e0b10
commit 307fd0da1f
5 changed files with 15 additions and 2 deletions
+3 -1
View File
@@ -69,7 +69,9 @@ fi
%{debuginfo} \
%{?kernel_cc} \
%{?kernel_ld} \
%{?kernel_llvm}
%{?kernel_llvm} \
%{?kernel_cross_compile} \
%{?kernel_arch}
make %{?_smp_mflags}
# Module signing (modsign)