Patch boost::function to fix strict aliasing problem (#1422456)

Per packaging guidelines don't clean buildroot in %%install and %%clean.
This commit is contained in:
Jonathan Wakely 2017-04-05 17:12:22 +01:00
parent 6d2d8199e5
commit 59415588c8
2 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,11 @@
--- boost_1_63_0/boost/function/function_template.hpp.alias 2017-03-24 12:17:21.560125198 +0000
+++ boost_1_63_0/boost/function/function_template.hpp 2017-03-24 13:07:24.971891166 +0000
@@ -994,7 +994,7 @@
if (!f.empty()) {
this->vtable = f.vtable;
if (this->has_trivial_copy_and_destroy())
- this->functor = f.functor;
+ __builtin_memcpy(&this->functor, &f.functor, sizeof(f.functor));
else
get_vtable()->base.manager(f.functor, this->functor,
boost::detail::function::move_functor_tag);

View File

@ -35,7 +35,7 @@ Name: boost
Summary: The free peer-reviewed portable C++ source libraries
Version: 1.63.0
%global version_enc 1_63_0
Release: 5%{?dist}
Release: 6%{?dist}
License: Boost and MIT and Python
%global toplev_dirname %{name}_%{version_enc}
@ -130,6 +130,8 @@ Patch82: boost-1.60.0-no-rpath.patch
# https://github.com/boostorg/build/issues/163
Patch83: boost-1.63.0-dual-python-build.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1422456
Patch84: boost-1.63.0-function-may-alias.patch
%bcond_with tests
%bcond_with docs_generated
@ -651,6 +653,7 @@ a number of significant features and is now developed independently
%patch68 -p1
%patch82 -p0
%patch83 -p1
%patch84 -p1
# At least python2_version needs to be a macro so that it's visible in
# %%install as well.
@ -764,7 +767,6 @@ echo ============================= build Boost.Build ==================
%install
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{toplev_dirname}
%if %{with openmpi} || %{with mpich}
@ -914,9 +916,6 @@ rm -f tmp-doc-files-to-be-installed
rm -f tmp-doc-directories
%{__install} -p -m 644 -t $EXAMPLESPATH LICENSE_1_0.txt
%clean
rm -rf $RPM_BUILD_ROOT
# MPI subpackages don't need the ldconfig magic. They are hidden by
# default, in MPI back-end-specific directory, and only show to the
@ -1296,6 +1295,10 @@ fi
%{_mandir}/man1/bjam.1*
%changelog
* Wed Apr 05 2017 Jonathan Wakely <jwakely@redhat.com> - 1.63.0-6
- Patch boost::function to fix strict aliasing problem (#1422456)
- Per packaging guidelines don't clean buildroot in %%install and %%clean.
* Sun Mar 12 2017 Peter Robinson <pbrobinson@fedoraproject.org> 1.63.0-5
- Enable OpenMPI/mpich on ppc64le and s390x now they have support