set LDFLAGS in a manner compatible with el6

__global_ldflags is not set on el6,
so only use that where available
This commit is contained in:
Pádraig Brady 2016-10-03 16:42:07 +01:00
parent ccc3322b44
commit 5302a3c717
1 changed files with 4 additions and 2 deletions

View File

@ -36,12 +36,14 @@ find -name .gitignore -delete
%patch0 -p1
%build
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
for dir in lib programs; do
CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" %make_build -C "$dir"
CFLAGS="%{optflags}" %make_build -C "$dir"
done
%check
CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" make -C tests test-zstd
%{?__global_ldflags:LDFLAGS="${LDFLAGS:-%__global_ldflags}" ; export LDFLAGS ;}
CFLAGS="%{optflags}" make -C tests test-zstd
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}