aboutsummaryrefslogtreecommitdiffstats
path: root/rpm
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-03-06 09:16:22 -0800
committerGitHub <[email protected]>2017-03-06 09:16:22 -0800
commite0aacd9b9767a877ad61b74cf87c0da856bb1e8a (patch)
tree4b70e9a5c4f511bb01ec8dc144ff9fdb65e2bb8b /rpm
parent8d5feecacfdcca29336209bdccd6493a5fa53576 (diff)
Fix powerpc build
Unlike other architectures which sanitize the LDFLAGS from the environment in arch/<arch>/Makefile. The powerpc Makefile allows LDFLAGS to be passed through resulting in the following build failure. /usr/bin/ld: unrecognized option '-Wl,-z,relro' LDFLAGS is set in /usr/lib/rpm/redhat/macros by default. Clear the environment variable when building kmods for powerpc. Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #607
Diffstat (limited to 'rpm')
-rw-r--r--rpm/generic/spl-kmod.spec.in5
-rw-r--r--rpm/redhat/spl-kmod.spec.in5
2 files changed, 10 insertions, 0 deletions
diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in
index 11d23fbe8..6a4be7a22 100644
--- a/rpm/generic/spl-kmod.spec.in
+++ b/rpm/generic/spl-kmod.spec.in
@@ -53,6 +53,11 @@ BuildRequires: %{_bindir}/kmodtool
%endif
%endif
+# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches)
+%ifarch ppc ppc64 ppc64le
+%global __global_ldflags %{nil}
+%endif
+
%if 0%{?fedora} >= 17
%define prefix /usr
%endif
diff --git a/rpm/redhat/spl-kmod.spec.in b/rpm/redhat/spl-kmod.spec.in
index 6fcc4a898..cab72a7c7 100644
--- a/rpm/redhat/spl-kmod.spec.in
+++ b/rpm/redhat/spl-kmod.spec.in
@@ -22,6 +22,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: @PACKAGE@ = %{version}\n\
Conflicts: @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble)
+# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches)
+%ifarch ppc ppc64 ppc64le
+%global __global_ldflags %{nil}
+%endif
+
%description
This package contains the kernel modules required to emulate
several interfaces provided by the Solaris kernel.