aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamian Szuberski <[email protected]>2022-02-08 17:17:37 -0500
committerBrian Behlendorf <[email protected]>2022-02-09 13:27:11 -0800
commit4eea717c4f940e029eda6b6fd438b7d5e68880c8 (patch)
tree57f06f6d19b600853c9260f78eb278e365ca92d2
parentb66140c6ad481cb13e685465c6a732f7f2b9dc77 (diff)
Propagate KERNEL_* to *.spec
Reviewed-by: Brian Behlendorf <[email protected]> Authored-by: Damian Szuberski <[email protected]> Signed-off-by: Peter Levine <[email protected]> Closes #13046
-rw-r--r--config/zfs-build.m43
-rw-r--r--rpm/generic/zfs-kmod.spec.in5
-rw-r--r--rpm/redhat/zfs-kmod.spec.in5
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