SHA256
3
0
forked from pool/xz

- Avoid running configure twice and using -fprofile-generate or

-fprofile-use for compiling configure tests when profiling.

OBS-URL: https://build.opensuse.org/package/show/Base:System/xz?expand=0&rev=72
This commit is contained in:
Richard Biener 2015-01-21 11:25:49 +00:00 committed by Git OBS Bridge
parent d657d56649
commit dd816714ab
2 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 21 11:21:32 UTC 2015 - rguenther@suse.com
- Avoid running configure twice and using -fprofile-generate or
-fprofile-use for compiling configure tests when profiling.
-------------------------------------------------------------------
Thu Dec 25 20:23:28 UTC 2014 - andreas.stieger@gmx.de

20
xz.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package xz
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -108,28 +108,20 @@ Static library for the LZMA library
%build
%global optflags %{optflags} -D_REENTRANT -pipe -fPIE
export LDFLAGS="-Wl,-z,relro,-z,now -pie"
%if %{do_profiling}
profiledir=$(mktemp -d)
trap "rm -rf $profiledir" EXIT
export CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir"
%endif
%configure \
%if ! %{with static_libs}
--disable-static \
%endif
--with-pic \
--docdir=%{_docdir}/%{name}
make %{?_smp_mflags}
%if %{do_profiling}
profiledir=$(mktemp -d)
trap "rm -rf $profiledir" EXIT
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}=$profiledir"
time make check
make clean %{?_smp_mflags}
export CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir"
%configure \
%if %{without static_libs}
--disable-static \
%endif
--with-pic \
--docdir=%{_docdir}/%{name}
make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}=$profiledir"
%else
make %{?_smp_mflags}
%endif