Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Fix powerpc build
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Mar 2, 2017
1 parent f5c5286 commit e44395c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rpm/generic/spl-kmod.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions rpm/redhat/spl-kmod.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit e44395c

Please sign in to comment.