From 2681f8a5b858cf44b293ec3f6918dded60ac9c7f Mon Sep 17 00:00:00 2001 From: Damian Szuberski Date: Tue, 8 Feb 2022 17:17:37 -0500 Subject: [PATCH] Propagate KERNEL_* to *.spec Reviewed-by: Brian Behlendorf Authored-by: Damian Szuberski Signed-off-by: Peter Levine Closes #13046 --- config/zfs-build.m4 | 3 +++ rpm/generic/zfs-kmod.spec.in | 5 ++++- rpm/redhat/zfs-kmod.spec.in | 5 ++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 27041c054c..126f78476b 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -368,6 +368,9 @@ AC_DEFUN([ZFS_AC_RPM], [ RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernels $(LINUX_VERSION)"' RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "ksrc $(LINUX)"' RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kobj $(LINUX_OBJ)"' + RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_cc KERNEL_CC=$(KERNEL_CC)"' + RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_ld KERNEL_LD=$(KERNEL_LD)"' + RPM_DEFINE_KMOD=${RPM_DEFINE_KMOD}' --define "kernel_llvm KERNEL_LLVM=$(KERNEL_LLVM)"' ]) RPM_DEFINE_DKMS='' diff --git a/rpm/generic/zfs-kmod.spec.in b/rpm/generic/zfs-kmod.spec.in index 1692be1a72..53b1e13851 100644 --- a/rpm/generic/zfs-kmod.spec.in +++ b/rpm/generic/zfs-kmod.spec.in @@ -140,7 +140,10 @@ for kernel_version in %{?kernel_versions}; do --with-linux=%{ksrc} \ --with-linux-obj=%{kobj} \ %{debug} \ - %{debuginfo} + %{debuginfo} \ + %{?kernel_cc} \ + %{?kernel_ld} \ + %{?kernel_llvm} make %{?_smp_mflags} cd .. done diff --git a/rpm/redhat/zfs-kmod.spec.in b/rpm/redhat/zfs-kmod.spec.in index eb93aeeb2e..7b74fdc51f 100644 --- a/rpm/redhat/zfs-kmod.spec.in +++ b/rpm/redhat/zfs-kmod.spec.in @@ -69,7 +69,10 @@ fi --with-linux=%{ksrc} \ --with-linux-obj=%{kobj} \ %{debug} \ - %{debuginfo} + %{debuginfo} \ + %{?kernel_cc} \ + %{?kernel_ld} \ + %{?kernel_llvm} make %{?_smp_mflags} %install