From af5c443f14715c93790f25fcef078c12826cc73f Mon Sep 17 00:00:00 2001 From: Patrick Diehl Date: Feb 22 2021 00:32:58 +0000 Subject: New patch --- diff --git a/d14c1b197f7b8ca6c7f31d3ab170af59c257733b.patch b/d14c1b197f7b8ca6c7f31d3ab170af59c257733b.patch deleted file mode 100644 index 43b731a..0000000 --- a/d14c1b197f7b8ca6c7f31d3ab170af59c257733b.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/libs/core/coroutines/CMakeLists.txt b/libs/core/coroutines/CMakeLists.txt -index 1dbd9886085..234427e89e0 100644 ---- a/libs/core/coroutines/CMakeLists.txt -+++ b/libs/core/coroutines/CMakeLists.txt -@@ -52,6 +52,7 @@ set(coroutines_compat_headers - - set(coroutines_sources - detail/context_base.cpp -+ detail/context_posix.cpp - detail/coroutine_impl.cpp - detail/coroutine_self.cpp - detail/posix_utility.cpp -diff --git a/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp b/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp -index 118d8400ac0..5c27bfc67f5 100644 ---- a/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp -+++ b/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp -@@ -65,6 +65,7 @@ - #include - #include - #include -+ - #include "pth/pth.h" - - namespace hpx { namespace threads { namespace coroutines { namespace detail { -@@ -96,7 +97,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail { - hpx::threads::coroutines::detail::posix::pth::check_( \ - pth_uctx_destroy(ctx)) - --#else // generic Posix platform (e.g. OS X >= 10.5) -+#else // generic Posix platform (e.g. OS X >= 10.5) - - /* - * makecontext based context implementation. Should be available on all -@@ -184,6 +185,10 @@ namespace hpx { namespace threads { namespace coroutines { - class ucontext_context_impl_base : detail::context_impl_base - { - public: -+ // on some platforms SIGSTKSZ resolves to a syscall, we can't make -+ // this constexpr -+ HPX_CORE_EXPORT static std::ptrdiff_t default_stack_size; -+ - ucontext_context_impl_base() - { - HPX_COROUTINE_CREATE_CONTEXT(m_ctx); -@@ -219,16 +224,13 @@ namespace hpx { namespace threads { namespace coroutines { - public: - typedef ucontext_context_impl_base context_impl_base; - -- // on some platforms SIGSTKSZ resolves to a syscall, we can't make -- // this constexpr -- static std::ptrdiff_t const default_stack_size = SIGSTKSZ; -- - /** - * Create a context that on restore invokes Functor on - * a new stack. The stack size can be optionally specified. - */ - explicit ucontext_context_impl(std::ptrdiff_t stack_size = -1) -- : m_stack_size(stack_size == -1 ? default_stack_size : stack_size) -+ : m_stack_size( -+ stack_size == -1 ? this->default_stack_size : stack_size) - , m_stack(nullptr) - , funp_(&trampoline) - { -diff --git a/libs/core/coroutines/src/detail/context_posix.cpp b/libs/core/coroutines/src/detail/context_posix.cpp -new file mode 100644 -index 00000000000..c0c3ce65091 ---- /dev/null -+++ b/libs/core/coroutines/src/detail/context_posix.cpp -@@ -0,0 +1,22 @@ -+// Copyright (c) 2021 Hartmut Kaiser -+// -+// SPDX-License-Identifier: BSL-1.0 -+// Distributed under the Boost Software License, Version 1.0. (See accompanying -+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -+ -+#include -+ -+#if defined(_POSIX_VERSION) || defined(__bgq__) || defined(__powerpc__) || \ -+ defined(__s390x__) -+#include -+ -+#include -+ -+namespace hpx { namespace threads { namespace coroutines { namespace detail { -+ namespace posix { -+ -+ std::ptrdiff_t ucontext_context_impl_base::default_stack_size = -+ SIGSTKSZ; -+}}}}} // namespace hpx::threads::coroutines::detail::posix -+ -+#endif diff --git a/fedora35.diff b/fedora35.diff new file mode 100644 index 0000000..979c1e5 --- /dev/null +++ b/fedora35.diff @@ -0,0 +1,99 @@ + libs/core/coroutines/CMakeLists.txt | 1 + + .../hpx/coroutines/detail/context_posix.hpp | 17 ++++++++--------- + libs/core/coroutines/src/detail/context_posix.cpp | 22 ++++++++++++++++++++++ + 3 files changed, 31 insertions(+), 9 deletions(-) + +diff --git a/libs/core/coroutines/CMakeLists.txt b/libs/core/coroutines/CMakeLists.txt +index 06c6dde6b53..210821b9581 100644 +--- a/libs/core/coroutines/CMakeLists.txt ++++ b/libs/core/coroutines/CMakeLists.txt +@@ -52,6 +52,7 @@ set(coroutines_compat_headers + + set(coroutines_sources + detail/context_base.cpp ++ detail/context_posix.cpp + detail/coroutine_impl.cpp + detail/coroutine_self.cpp + detail/posix_utility.cpp +diff --git a/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp b/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp +index 405722e2dba..5c27bfc67f5 100644 +--- a/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp ++++ b/libs/core/coroutines/include/hpx/coroutines/detail/context_posix.hpp +@@ -65,6 +65,7 @@ + #include + #include + #include ++ + #include "pth/pth.h" + + namespace hpx { namespace threads { namespace coroutines { namespace detail { +@@ -96,7 +97,7 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail { + hpx::threads::coroutines::detail::posix::pth::check_( \ + pth_uctx_destroy(ctx)) + +-#else // generic Posix platform (e.g. OS X >= 10.5) ++#else // generic Posix platform (e.g. OS X >= 10.5) + + /* + * makecontext based context implementation. Should be available on all +@@ -184,6 +185,10 @@ namespace hpx { namespace threads { namespace coroutines { + class ucontext_context_impl_base : detail::context_impl_base + { + public: ++ // on some platforms SIGSTKSZ resolves to a syscall, we can't make ++ // this constexpr ++ HPX_CORE_EXPORT static std::ptrdiff_t default_stack_size; ++ + ucontext_context_impl_base() + { + HPX_COROUTINE_CREATE_CONTEXT(m_ctx); +@@ -219,19 +224,13 @@ namespace hpx { namespace threads { namespace coroutines { + public: + typedef ucontext_context_impl_base context_impl_base; + +- enum +- { +- default_stack_size = SIGSTKSZ +- }; +- + /** + * Create a context that on restore invokes Functor on + * a new stack. The stack size can be optionally specified. + */ + explicit ucontext_context_impl(std::ptrdiff_t stack_size = -1) +- : m_stack_size(stack_size == -1 ? +- static_cast(default_stack_size) : +- stack_size) ++ : m_stack_size( ++ stack_size == -1 ? this->default_stack_size : stack_size) + , m_stack(nullptr) + , funp_(&trampoline) + { +diff --git a/libs/core/coroutines/src/detail/context_posix.cpp b/libs/core/coroutines/src/detail/context_posix.cpp +new file mode 100644 +index 00000000000..c0c3ce65091 +--- /dev/null ++++ b/libs/core/coroutines/src/detail/context_posix.cpp +@@ -0,0 +1,22 @@ ++// Copyright (c) 2021 Hartmut Kaiser ++// ++// SPDX-License-Identifier: BSL-1.0 ++// Distributed under the Boost Software License, Version 1.0. (See accompanying ++// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ++ ++#include ++ ++#if defined(_POSIX_VERSION) || defined(__bgq__) || defined(__powerpc__) || \ ++ defined(__s390x__) ++#include ++ ++#include ++ ++namespace hpx { namespace threads { namespace coroutines { namespace detail { ++ namespace posix { ++ ++ std::ptrdiff_t ucontext_context_impl_base::default_stack_size = ++ SIGSTKSZ; ++}}}}} // namespace hpx::threads::coroutines::detail::posix ++ ++#endif diff --git a/hpx.spec b/hpx.spec index 795220d..74e1c54 100644 --- a/hpx.spec +++ b/hpx.spec @@ -5,7 +5,7 @@ Summary: General Purpose C++ Runtime System License: Boost URL: http://stellar.cct.lsu.edu/tag/hpx/ Source0: http://stellar.cct.lsu.edu/files/%{name}_%{version}.tar.gz -Patch0: d14c1b197f7b8ca6c7f31d3ab170af59c257733b.patch +Patch0: fedora35.diff BuildRequires: gcc-c++ >= 4.9