From f9cbc68d4325cfd3d1468f146ffcd0cb92644405 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Jun 28 2016 16:27:27 +0000 Subject: Add patch for Boost.Multiprecision (#1349638) --- diff --git a/boost-1.60-multiprecision.patch b/boost-1.60-multiprecision.patch new file mode 100644 index 0000000..e060ddc --- /dev/null +++ b/boost-1.60-multiprecision.patch @@ -0,0 +1,37 @@ +commit f9c8f9ec091ad232c0a291904f7839d665d098e0 +Author: jzmaddock +Date: Thu Mar 3 10:52:03 2016 +0000 + + Add some needed casts for cases where limb_type is wider than unsigned int. + +diff --git a/include/boost/multiprecision/cpp_int.hpp b/include/boost/multiprecision/cpp_int.hpp +index 60ad876..b868167 100644 +--- a/include/boost/multiprecision/cpp_int.hpp ++++ b/include/boost/multiprecision/cpp_int.hpp +@@ -190,7 +190,7 @@ private: + public: + BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT); + BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast(0u)); +- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ++ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast(1u) << (limb_bits - 1)); + BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = + MinBits + ? (MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0)) +@@ -413,7 +413,7 @@ struct cpp_int_base + public: + BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT); + BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast(0u)); +- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ++ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast(1u) << (limb_bits - 1)); + BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0)); + BOOST_STATIC_CONSTANT(bool, variable = false); + BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0))); +@@ -565,7 +565,7 @@ struct cpp_int_base + public: + BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT); + BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast(0u)); +- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = 1u << (limb_bits - 1)); ++ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast(1u) << (limb_bits - 1)); + BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0)); + BOOST_STATIC_CONSTANT(bool, variable = false); + BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0))); diff --git a/boost.spec b/boost.spec index 79766ff..5a6baa1 100644 --- a/boost.spec +++ b/boost.spec @@ -38,7 +38,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.60.0 %global version_enc 1_60_0 -Release: 7%{?dist} +Release: 8%{?dist} License: Boost and MIT and Python %global toplev_dirname %{name}_%{version_enc} @@ -134,6 +134,9 @@ Patch81: boost-1.59-test-fenv.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1318383 Patch82: boost-1.60.0-no-rpath.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1349638 +Patch83: boost-1.60-multiprecision.patch + %bcond_with tests %bcond_with docs_generated @@ -645,6 +648,7 @@ a number of significant features and is now developed independently %patch68 -p1 %patch81 -p2 %patch82 -p0 +%patch83 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -1273,6 +1277,9 @@ fi %{_mandir}/man1/bjam.1* %changelog +* Tue Jun 28 2016 Jonathan Wakely - 1.60.0-8 +- Add patch for Boost.Multiprecision (#1349638) + * Mon Jun 06 2016 Yaakov Selkowitz - 1.60.0-7 - Drop rpath (#1318383)