1
0

Fix "make check" with -flto

OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=220
This commit is contained in:
Martin Wilck 2020-08-21 20:35:59 +00:00 committed by Git OBS Bridge
parent b170dfdda0
commit 25e318fa54

View File

@ -162,8 +162,10 @@ cp %{SOURCE4} .
%if 0%{?with_check} == 1
%check
cd tests
make OPTFLAGS="%{optflags}" %{_make_output_sync} %{?_smp_mflags}
# ld fails to resolve cmocka's __wrap symbols with -flto
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88643
_opt=$(echo "%optflags" | sed 's/-flto\(=[^ ]*\)\{0,1\}//')
make OPTFLAGS="$_opt" %{_make_output_sync} %{?_smp_mflags} test
%endif
%install