From 4eea717c4f940e029eda6b6fd438b7d5e68880c8 Mon Sep 17 00:00:00 2001 From: Damian Szuberski Date: Tue, 8 Feb 2022 17:17:37 -0500 Subject: 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 35267795b..d75867c65 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 1692be1a7..53b1e1385 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 eb93aeeb2..7b74fdc51 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 -- cgit v1.2.3