diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index 35267795b2..d75867c65d 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -371,6 +371,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