Add an option to replace unsafe functions in the compat lib with a stub
This commit is contained in:
parent
904ed6a794
commit
4125fd1e20
@ -12,6 +12,13 @@
|
||||
%bcond_with compat_pkg
|
||||
%endif
|
||||
|
||||
# Replace obsolete functions with a stub?
|
||||
%if (0%{?fedora} >= 999 || 0%{?rhel} >= 99) && %{with compat_pkg}
|
||||
%bcond_without enosys_stubs
|
||||
%else
|
||||
%bcond_with enosys_stubs
|
||||
%endif
|
||||
|
||||
# Run memcheck?
|
||||
# Valgrind does not work well on %%{power64} arches.
|
||||
%ifnarch %{power64}
|
||||
@ -57,6 +64,12 @@
|
||||
%global compat_api glibc
|
||||
%endif
|
||||
|
||||
%if %{with enosys_stubs}
|
||||
%global enosys_stubs yes
|
||||
%else
|
||||
%global enosys_stubs no
|
||||
%endif
|
||||
|
||||
|
||||
# Needed for the distribution README file.
|
||||
%if 0%{?fedora}
|
||||
@ -265,7 +278,12 @@ pushd %{_vpath_builddir}
|
||||
%configure \
|
||||
%{common_configure_options} \
|
||||
--enable-hashes=%{hash_methods} \
|
||||
--enable-obsolete-api=%{obsolete_api}
|
||||
--enable-obsolete-api=%{obsolete_api} \
|
||||
%if %{with new_api}
|
||||
--enable-obsolete-api-enosys=%{obsolete_api}
|
||||
%else
|
||||
--enable-obsolete-api-enosys=%{enosys_stubs}
|
||||
%endif
|
||||
%make_build
|
||||
popd
|
||||
|
||||
@ -275,7 +293,8 @@ pushd %{_vpath_builddir}-compat
|
||||
%configure \
|
||||
%{common_configure_options} \
|
||||
--enable-hashes=%{compat_methods} \
|
||||
--enable-obsolete-api=%{compat_api}
|
||||
--enable-obsolete-api=%{compat_api} \
|
||||
--enable-obsolete-api-enosys=%{enosys_stubs}
|
||||
%make_build
|
||||
popd
|
||||
%endif
|
||||
@ -381,6 +400,7 @@ done
|
||||
%changelog
|
||||
* Thu Jan 24 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.3-2
|
||||
- Fix and simplify the conditionals for the compat package
|
||||
- Add an option to replace unsafe functions in the compat lib with a stub
|
||||
|
||||
* Thu Jan 24 2019 Björn Esser <besser82@fedoraproject.org> - 4.4.3-1
|
||||
- New upstream release
|
||||
|
Loading…
Reference in New Issue
Block a user