Add -fPIC compiler flag for Redhat/Fedora/CentOS

Fixes #573
This commit is contained in:
Jonas Kvinge 2020-10-30 18:12:42 +01:00
parent 4bccb1ab47
commit e8492940a5
1 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,9 @@ Features:
%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
%build
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos}
export CXXFLAGS="-fPIC $RPM_OPT_FLAGS"
%endif
%{cmake} -DCMAKE_BUILD_TYPE:STRING=Release
%if 0%{?centos} || 0%{?mageia}
%make_build