From ef6a0a1ce3ee45ddd1cfe603493a0b3191e2bb28 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:32:19 +0000 Subject: import boost-1.53.0-27.el7 --- diff --git a/SOURCES/boost-1.53-spirit-lexer.patch b/SOURCES/boost-1.53-spirit-lexer.patch new file mode 100644 index 0000000..e963913 --- /dev/null +++ b/SOURCES/boost-1.53-spirit-lexer.patch @@ -0,0 +1,82 @@ +From 2b4c331e70f1f8eaae33537df12c5744dd8e8b09 Mon Sep 17 00:00:00 2001 +From: Hartmut Kaiser +Date: Sat, 16 Mar 2013 14:39:51 +0000 +Subject: [PATCH] Fix #8291: Lexer fails to work on ARM + +[SVN r83462] +--- + include/boost/spirit/home/support/detail/lexer/generator.hpp | 3 ++- + include/boost/spirit/home/support/detail/lexer/string_token.hpp | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/include/boost/spirit/home/support/detail/lexer/generator.hpp b/include/boost/spirit/home/support/detail/lexer/generator.hpp +index 49bea2f..9541f6f 100644 +--- a/include/boost/spirit/home/support/detail/lexer/generator.hpp ++++ b/include/boost/spirit/home/support/detail/lexer/generator.hpp +@@ -12,6 +12,7 @@ + #include "partition/charset.hpp" + #include "partition/equivset.hpp" + #include ++#include + #include "parser/tree/node.hpp" + #include "parser/parser.hpp" + #include "containers/ptr_list.hpp" +@@ -560,7 +561,7 @@ class basic_generator + + if (token_._negated) + { +- CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; ++ CharT curr_char_ = (std::numeric_limits::min)(); + std::size_t i_ = 0; + + while (curr_ < chars_end_) +diff --git a/include/boost/spirit/home/support/detail/lexer/string_token.hpp b/include/boost/spirit/home/support/detail/lexer/string_token.hpp +index 6bfa6ff..e972a95 100644 +--- a/include/boost/spirit/home/support/detail/lexer/string_token.hpp ++++ b/include/boost/spirit/home/support/detail/lexer/string_token.hpp +@@ -10,6 +10,7 @@ + #include "size_t.hpp" + #include "consts.hpp" // num_chars, num_wchar_ts + #include ++#include + + namespace boost + { +@@ -71,7 +72,7 @@ struct basic_string_token + { + const std::size_t max_chars_ = sizeof (CharT) == 1 ? + num_chars : num_wchar_ts; +- CharT curr_char_ = sizeof (CharT) == 1 ? -128 : 0; ++ CharT curr_char_ = (std::numeric_limits::min)(); + string temp_; + const CharT *curr_ = _charset.c_str (); + const CharT *chars_end_ = curr_ + _charset.size (); + +From c480d6c7fcadf3cb5fbaad756ac370275a75e601 Mon Sep 17 00:00:00 2001 +From: Joel de Guzman +Date: Sat, 19 Jul 2014 08:12:53 +0800 +Subject: [PATCH] workaround for lexertl bug on platforms where wchar_t is + signed (can be negative). + +--- + include/boost/spirit/home/support/detail/lexer/generator.hpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/include/boost/spirit/home/support/detail/lexer/generator.hpp b/include/boost/spirit/home/support/detail/lexer/generator.hpp +index a3b7290..daa06e7 100644 +--- a/include/boost/spirit/home/support/detail/lexer/generator.hpp ++++ b/include/boost/spirit/home/support/detail/lexer/generator.hpp +@@ -561,7 +561,12 @@ class basic_generator + + if (token_._negated) + { +- CharT curr_char_ = (std::numeric_limits::min)(); ++ // $$$ FIXME JDG July 2014 $$$ ++ // this code is problematic on platforms where wchar_t is signed ++ // with min generating negative numbers. This crashes with BAD_ACCESS ++ // because of the vector index below: ++ // ptr_[static_cast(curr_char_)] ++ CharT curr_char_ = 0; // (std::numeric_limits::min)(); + std::size_t i_ = 0; + + while (curr_ < chars_end_) diff --git a/SPECS/boost.spec b/SPECS/boost.spec index 81fc3f1..4637424 100644 --- a/SPECS/boost.spec +++ b/SPECS/boost.spec @@ -34,7 +34,7 @@ Name: boost Summary: The free peer-reviewed portable C++ source libraries Version: 1.53.0 %define version_enc 1_53_0 -Release: 26%{?dist} +Release: 27%{?dist} License: Boost and MIT and Python %define toplev_dirname %{name}_%{version_enc} @@ -222,6 +222,9 @@ Patch62: boost-1.53.0-python-abi_letters.patch Patch63: boost-1.53.0-python-test-PyImport_AppendInittab.patch Patch64: boost-1.53.0-no-rpath.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1402516 +Patch70: boost-1.53-spirit-lexer.patch + %bcond_with tests %bcond_with docs_generated @@ -693,6 +696,7 @@ a number of significant features and is now developed independently %patch62 -p1 %patch63 -p1 %patch64 -p1 +%patch70 -p2 # At least python2_version needs to be a macro so that it's visible in # %%install as well. @@ -1268,6 +1272,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/bjam.1* %changelog +* Tue Feb 21 2017 Jonathan Wakely - 1.53.0-27 +- Patch Boost.Spirit for ppc64 (#1402516) + * Fri Jun 10 2016 Jonathan Wakely - 1.53.0-26 - Install unpatched gcc.jam (#1305019). - Build libboost_python and libboost_python3 such that they depend on