Skip to content

Commit

Permalink
boost: apply upstream patches to 1.80.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Apr 6, 2023
1 parent 1e83210 commit 5803544
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions recipes/boost/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ patches:
patch_description: "On POSIX systems that don't support *at APIs, compilation fails due to a missing include"
patch_type: "official"
patch_source: "https://github.com/boostorg/filesystem/issues/250"
- patch_file: "patches/1.80.0-0005-config-libcpp15.patch"
patch_description: "Support for libcpp15 which removes std::unary_function and std::binary_function."
patch_type: "official"
patch_source: "https://www.boost.org/patches/1_80_0/0005-config-libcpp15.patch"
- patch_file: "patches/1.80.0-0006-unordered-msvc-rtcc.patch"
patch_description: "Fix MSVC /RTCc build runtime failures."
patch_type: "official"
patch_source: "https://www.boost.org/patches/1_80_0/0006-unordered-msvc-rtcc.patch"
"1.79.0":
- patch_file: "patches/boost_locale_fail_on_missing_backend.patch"
patch_description: "Fails the build when there is no iconv backend"
Expand Down
16 changes: 16 additions & 0 deletions recipes/boost/all/patches/1.80.0-0005-config-libcpp15.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- a/boost/config/stdlib/libcpp.hpp 2022-08-03 22:47:07.000000000 -0400
+++ b/boost/config/stdlib/libcpp.hpp 2022-09-16 22:16:17.044119011 -0400
@@ -168,4 +168,13 @@
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif

+#if _LIBCPP_VERSION >= 15000
+//
+// Unary function is now deprecated in C++11 and later:
+//
+#if __cplusplus >= 201103L
+#define BOOST_NO_CXX98_FUNCTION_BASE
+#endif
+#endif
+
// --- end ---
18 changes: 18 additions & 0 deletions recipes/boost/all/patches/1.80.0-0006-unordered-msvc-rtcc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--- a/boost/unordered/detail/prime_fmod.hpp 2022-08-03 22:47:16.000000000 -0400
+++ b/boost/unordered/detail/prime_fmod.hpp 2022-12-14 01:45:27.368620146 -0500
@@ -117,9 +117,15 @@
#if defined(BOOST_UNORDERED_FCA_HAS_64B_SIZE_T)
std::size_t sizes_under_32bit = inv_sizes32_len;
if (BOOST_LIKELY(size_index < sizes_under_32bit)) {
+#if defined(__MSVC_RUNTIME_CHECKS)
+ return fast_modulo(
+ boost::uint32_t(hash & 0xffffffffu) + boost::uint32_t(hash >> 32),
+ inv_sizes32[size_index], boost::uint32_t(sizes[size_index]));
+#else
return fast_modulo(
boost::uint32_t(hash) + boost::uint32_t(hash >> 32),
inv_sizes32[size_index], boost::uint32_t(sizes[size_index]));
+#endif
} else {
return positions[size_index - sizes_under_32bit](hash);
}

0 comments on commit 5803544

Please sign in to comment.