]> git.proxmox.com Git - mirror_spl.git/commitdiff
Fix powerpc build
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 6 Mar 2017 17:16:22 +0000 (09:16 -0800)
committerGitHub <noreply@github.com>
Mon, 6 Mar 2017 17:16:22 +0000 (09:16 -0800)
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 <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #607

rpm/generic/spl-kmod.spec.in
rpm/redhat/spl-kmod.spec.in

index 11d23fbe82cde47fb1e81c298c0ce68a808ca329..6a4be7a223b469e738283f193c52f754ca744b21 100644 (file)
@@ -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
index 6fcc4a898b55dcfe82ba1ad0bf3b43a546d77f57..cab72a7c78dad31ce5e167cba4bd529607cf3aad 100644 (file)
@@ -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.