Accepting request 244793 from home:Dmitry_R:branches:devel:libraries:c_c++

- Update to version 1.56.0. Major changes since 1.54.0:
  New libraries:
  * Predef: This library defines a set of compiler, architecture,
    operating system, library, and other version numbers from the
    information it can gather of C, C++, Objective C, and Objective
    C++ predefined macros or those defined in generally available
    headers, from Rene Rivera.
  * Align: Memory alignment functions, allocators, and adaptors.
  * Type_Index: Runtime/Compile time copyable type info.
  For a detailed descriptions see:
  http://www.boost.org/users/history/version_1_56_0.html
  http://www.boost.org/users/history/version_1_55_0.html
- Rebase boost-thread.patch
- Rabase boost-use_std_xml_catalog.patch
- Rebase bjam-alignment.patch
- Remove obsolete boost-glibc-2.18.patch
- Remove obsolete boost-1.54-001-coroutine.patch
- Remove obsolete boost-1.54-002-date-time.patch
- Remove obsolete boost-1.54-003-log.patch
- Remove obsolete boost-1.54-change85160.patch
- Remove obsolete boost-1.54.0-thread-link_atomic.patch
- Remove obsolete boost-ppc64-abiv2-context.patch
- Remove obsolete boost-ppc64-abiv2-coroutine.patch
- Remove outdated man pages boost_1_54_man.tar.bz2

OBS-URL: https://build.opensuse.org/request/show/244793
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=135
This commit is contained in:
Thorsten Behrens 2014-09-11 21:51:21 +00:00 committed by Git OBS Bridge
parent b3d6540489
commit c7d1bcbeab
19 changed files with 205 additions and 1397 deletions

View File

@ -1,21 +1,23 @@
package boost-devel
requires -boost-<targettype>
libboost_atomic1_54_0
libboost_context1_54_0
libboost_date_time1_54_0
libboost_filesystem1_54_0
libboost_graph1_54_0
libboost_graph_parallel1_54_0
libboost_iostreams1_54_0
libboost_math1_54_0
libboost_mpi1_54_0
libboost_test1_54_0
libboost_program_options1_54_0
libboost_python1_54_0
libboost_random1_54_0
libboost_serialization1_54_0
libboost_signals1_54_0
libboost_system1_54_0
libboost_thread1_54_0
libboost_wave1_54_0
libboost_regex1_54_0
libboost_atomic1_56_0
libboost_container1_56_0
libboost_context1_56_0
libboost_coroutine1_56_0
libboost_date_time1_56_0
libboost_filesystem1_56_0
libboost_graph1_56_0
libboost_graph_parallel1_56_0
libboost_iostreams1_56_0
libboost_math1_56_0
libboost_mpi1_56_0
libboost_test1_56_0
libboost_program_options1_56_0
libboost_python1_56_0
libboost_random1_56_0
libboost_serialization1_56_0
libboost_signals1_56_0
libboost_system1_56_0
libboost_thread1_56_0
libboost_wave1_56_0
libboost_regex1_56_0

View File

@ -1,7 +1,7 @@
Index: boost_1_54_0/tools/build/v2/engine/function.c
Index: boost_1_56_0/tools/build/src/engine/function.c
===================================================================
--- boost_1_54_0.orig/tools/build/v2/engine/function.c
+++ boost_1_54_0/tools/build/v2/engine/function.c
--- boost_1_56_0.orig/tools/build/src/engine/function.c
+++ boost_1_56_0/tools/build/src/engine/function.c
@@ -230,7 +230,7 @@ STACK * stack_global()
static void check_alignment( STACK * s )

View File

@ -1,19 +0,0 @@
------------------------------------------------------------------------
r84947 | danieljames | 2013-07-03 22:57:56 +0100 (Wed, 03 Jul 2013) | 4 lines
coroutine: fix typo in Jamfile
From [84622], by olli
------------------------------------------------------------------------
--- 1_54_0/libs/coroutine/build/Jamfile.v2 (revision 84946)
+++ 1_54_0/libs/coroutine/build/Jamfile.v2 (revision 84947)
@@ -40,7 +40,7 @@
: detail/standard_stack_allocator_posix.cpp
;
-explicit yield_sources ;
+explicit allocator_sources ;
lib boost_coroutine
: allocator_sources

View File

@ -1,19 +0,0 @@
------------------------------------------------------------------------
r84948 | danieljames | 2013-07-03 23:02:30 +0100 (Wed, 03 Jul 2013) | 4 lines
In C++11 the shared_ptr -> bool conversion is explicit. In custom time zone code, make the cast explicit. Fixes compilation failure in C++11
From [84626], by marshall.
------------------------------------------------------------------------
--- 1_54_0/boost/date_time/local_time/custom_time_zone.hpp (revision 84947)
+++ 1_54_0/boost/date_time/local_time/custom_time_zone.hpp (revision 84948)
@@ -64,7 +64,7 @@
//! True if zone uses daylight savings adjustments
virtual bool has_dst() const
{
- return (dst_calc_rules_); //if calc_rule is set the tz has dst
+ return (bool) dst_calc_rules_; //if calc_rule is set the tz has dst
}
//! Local time that DST starts -- NADT if has_dst is false
virtual posix_time::ptime dst_local_start_time(gregorian::greg_year y) const

View File

@ -1,16 +0,0 @@
------------------------------------------------------------------------
r84966 | andysem | 2013-07-07 11:43:20 +0100 (Sun, 07 Jul 2013) | 1 line
Backported fix for BOOST_LOG_ONCE_BLOCK_FLAG macro definition.
------------------------------------------------------------------------
--- 1_54_0/boost/log/utility/once_block.hpp (revision 84965)
+++ 1_54_0/boost/log/utility/once_block.hpp (revision 84966)
@@ -176,7 +176,7 @@
* been executed.
*/
#define BOOST_LOG_ONCE_BLOCK_FLAG(flag_var)\
- BOOST_LOG_ONCE_BLOCK_INTERNAL(\
+ BOOST_LOG_ONCE_BLOCK_FLAG_INTERNAL(\
flag_var,\
BOOST_LOG_UNIQUE_IDENTIFIER_NAME(_boost_log_once_block_sentry_))

View File

@ -1,237 +0,0 @@
Index: boost/lexical_cast.hpp
===================================================================
--- boost/lexical_cast.hpp (revision 84183)
+++ boost/lexical_cast.hpp (revision 85160)
@@ -69,9 +69,4 @@
throw_exception(bad_lexical_cast(typeid(Source), typeid(Target)))
#endif
-
-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
-#define BOOST_LCAST_HAS_INT128
-#endif
-
namespace boost
@@ -317,5 +312,5 @@
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {};
template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {};
@@ -614,5 +609,5 @@
BOOST_LCAST_DEF( __int64)
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
BOOST_LCAST_DEF(boost::int128_type)
BOOST_LCAST_DEF(boost::uint128_type)
@@ -880,4 +875,13 @@
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+
+ // GCC when used with flag -std=c++0x may not have std::numeric_limits
+ // specializations for __int128 and unsigned __int128 types.
+ // Try compilation with -std=gnu++0x or -std=gnu++11.
+ //
+ // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<T>::is_specialized,
+ "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast"
+ );
#endif
CharT const czero = lcast_char_constants<CharT>::zero;
@@ -1828,5 +1832,5 @@
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
bool operator<<(const boost::uint128_type& n) { start = lcast_put_unsigned<Traits>(n, finish); return true; }
bool operator<<(const boost::int128_type& n) { return shl_signed(n); }
@@ -2040,5 +2044,5 @@
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); }
bool operator>>(boost::int128_type& output) { return shr_signed(output); }
@@ -2554,5 +2558,5 @@
}
#endif
-#ifndef BOOST_NO_CHAR16_T
+#ifndef BOOST_NO_CXX11_CHAR16_T
template <typename Target>
inline Target lexical_cast(const char16_t* chars, std::size_t count)
@@ -2563,5 +2567,5 @@
}
#endif
-#ifndef BOOST_NO_CHAR32_T
+#ifndef BOOST_NO_CXX11_CHAR32_T
template <typename Target>
inline Target lexical_cast(const char32_t* chars, std::size_t count)
@@ -2720,5 +2724,4 @@
#undef BOOST_LCAST_THROW_BAD_CAST
#undef BOOST_LCAST_NO_WCHAR_T
-#undef BOOST_LCAST_HAS_INT128
#endif // BOOST_LEXICAL_CAST_INCLUDED
Index: libs/conversion/test/lexical_cast_integral_types_test.cpp
===================================================================
--- libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 83764)
+++ libs/conversion/test/lexical_cast_integral_types_test.cpp (revision 85160)
@@ -49,8 +49,4 @@
#endif
-#if (defined(BOOST_LCAST_HAS_INT128) && !defined(__GNUC__)) || GCC_VERSION > 40700
-#define BOOST_LCAST_HAS_INT128
-#endif
-
// Test all 65536 values if true:
bool const lcast_test_small_integral_types_completely = false;
@@ -76,5 +72,5 @@
void test_conversion_from_to_ulonglong();
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
void test_conversion_from_to_int128();
void test_conversion_from_to_uint128();
@@ -100,5 +96,5 @@
suite->add(BOOST_TEST_CASE(&test_conversion_from_to_ulonglong));
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
suite->add(BOOST_TEST_CASE(&test_conversion_from_to_int128));
suite->add(BOOST_TEST_CASE(&test_conversion_from_to_uint128));
@@ -445,6 +441,6 @@
// Overflow test case from David W. Birdsall
- std::string must_owerflow_str = "160000000000000000000";
- std::string must_owerflow_negative_str = "-160000000000000000000";
+ std::string must_owerflow_str = (sizeof(T) < 16 ? "160000000000000000000" : "1600000000000000000000000000000000000000");
+ std::string must_owerflow_negative_str = (sizeof(T) < 16 ? "-160000000000000000000" : "-1600000000000000000000000000000000000000");
for (int i = 0; i < 15; ++i) {
BOOST_CHECK_THROW(lexical_cast<T>(must_owerflow_str), bad_lexical_cast);
@@ -558,13 +554,32 @@
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
+
+template <bool Specialized, class T>
+struct test_if_specialized {
+ static void test() {}
+};
+
+template <class T>
+struct test_if_specialized<true, T> {
+ static void test() {
+ test_conversion_from_to_integral_minimal<T>();
+ }
+};
+
void test_conversion_from_to_int128()
{
- test_conversion_from_to_integral_minimal<boost::int128_type>();
+ test_if_specialized<
+ std::numeric_limits<boost::int128_type>::is_specialized,
+ boost::int128_type
+ >::test();
}
void test_conversion_from_to_uint128()
{
- test_conversion_from_to_integral_minimal<boost::uint128_type>();
+ test_if_specialized<
+ std::numeric_limits<boost::int128_type>::is_specialized,
+ boost::uint128_type
+ >::test();
}
#endif
@@ -603,5 +618,5 @@
#endif
-#ifdef BOOST_LCAST_HAS_INT128
+#ifdef BOOST_HAS_INT128
test_integral_conversions_on_min_max_impl<boost::int128_type>();
#endif
Index: libs/conversion/test/Jamfile.v2
===================================================================
--- libs/conversion/test/Jamfile.v2 (revision 83689)
+++ libs/conversion/test/Jamfile.v2 (revision 85160)
@@ -1,4 +1,4 @@
# Copyright (C) 2001-2003 Douglas Gregor
-# Copyright (C) 2011-2012 Antony Polukhin
+# Copyright (C) 2011-2013 Antony Polukhin
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
@@ -16,4 +16,9 @@
<toolset>gcc-4.6:<cxxflags>-ftrapv
<toolset>clang:<cxxflags>-ftrapv
+ # default to all warnings on:
+ <warnings>all
+ # set warnings as errors for those compilers we know we get warning free:
+ <toolset>gcc:<cxxflags>-Wextra
+ <toolset>gcc:<cxxflags>-Wno-uninitialized
;
Index: libs/conversion/test/implicit_cast_fail.cpp
===================================================================
--- libs/conversion/test/implicit_cast_fail.cpp (revision 79364)
+++ libs/conversion/test/implicit_cast_fail.cpp (revision 85160)
@@ -20,5 +20,7 @@
{
foo x = implicit_cast<foo>("foobar");
- (void)x; // warning suppression.
+ (void)x; // warning suppression.
+ BOOST_CHECK(false); // suppressing warning about 'boost::unit_test::{anonymous}::unit_test_log' defined but not used
return 0;
}
+
Index: libs/conversion/test/lexical_cast_to_pointer_test.cpp
===================================================================
--- libs/conversion/test/lexical_cast_to_pointer_test.cpp (revision 83689)
+++ libs/conversion/test/lexical_cast_to_pointer_test.cpp (revision 85160)
@@ -18,4 +18,6 @@
{
boost::lexical_cast<char*>("Hello");
+ BOOST_CHECK(false); // suppressing warning about 'boost::unit_test::{anonymous}::unit_test_log' defined but not used
return 0;
}
+
Index: libs/conversion/index.html
===================================================================
--- libs/conversion/index.html (revision 73851)
+++ libs/conversion/index.html (revision 85160)
@@ -7,4 +7,11 @@
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Boost Conversion Library</title>
+<style>
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+</style>
</head>
@@ -33,5 +40,9 @@
S-Format="%d %B, %Y" startspan -->June 23, 2005<!--webbot bot="Timestamp" endspan i-checksum="30348" -->
</p>
-
+<p class="copyright">
+ Copyright 2001 Beman Dawes.
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
+</p>
</body>
Index: libs/conversion/numeric_cast_test.cpp
===================================================================
--- libs/conversion/numeric_cast_test.cpp (revision 80409)
+++ libs/conversion/numeric_cast_test.cpp (revision 85160)
@@ -49,5 +49,5 @@
signed char c = 0;
- c = large_value; // see if compiler generates warning
+ c = static_cast<signed char>(large_value);
c = numeric_cast<signed char>( small_value );

View File

@ -1,51 +0,0 @@
diff -Nurp boost_1_54_0/libs/thread/build/has_atomic_flag_lockfree_test.cpp boost_1_54_0.pm/libs/thread/build/has_atomic_flag_lockfree_test.cpp
--- boost_1_54_0/libs/thread/build/has_atomic_flag_lockfree_test.cpp 1970-01-01 01:00:00.000000000 +0100
+++ boost_1_54_0.pm/libs/thread/build/has_atomic_flag_lockfree_test.cpp 2013-08-23 19:51:52.706329968 +0200
@@ -0,0 +1,14 @@
+// Copyright (c) 2013, Petr Machata, Red Hat Inc.
+//
+// Use modification and distribution are subject to the boost Software
+// License, Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
+
+#include "../../../boost/atomic.hpp"
+#include "../../../boost/static_assert.hpp"
+
+int
+main(int argc, char *argv[])
+{
+ BOOST_STATIC_ASSERT(BOOST_ATOMIC_FLAG_LOCK_FREE);
+ return 0;
+}
diff -Nurp boost_1_54_0/libs/thread/build/Jamfile.v2 boost_1_54_0.pm/libs/thread/build/Jamfile.v2
--- boost_1_54_0/libs/thread/build/Jamfile.v2 2013-06-15 12:35:45.000000000 +0200
+++ boost_1_54_0.pm/libs/thread/build/Jamfile.v2 2013-08-23 19:52:30.018613408 +0200
@@ -36,6 +36,7 @@ import os ;
import feature ;
import indirect ;
import path ;
+import configure ;
project boost/thread
: source-location ../src
@@ -140,6 +141,8 @@ local rule default_threadapi ( )
feature.feature threadapi : pthread win32 : propagated ;
feature.set-default threadapi : [ default_threadapi ] ;
+exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
+
rule tag ( name : type ? : property-set )
{
local result = $(name) ;
@@ -248,6 +251,12 @@ rule requirements ( properties * )
{
local result ;
+ if ! [ configure.builds has_atomic_flag_lockfree
+ : $(properties) : "lockfree boost::atomic_flag" ]
+ {
+ result += <library>/boost/atomic//boost_atomic ;
+ }
+
if <threadapi>pthread in $(properties)
{
result += <define>BOOST_THREAD_POSIX ;

View File

@ -1,15 +0,0 @@
diff -urN boost_1_53_0/boost/cstdint.hpp boost_1_53_0.new/boost/cstdint.hpp
--- boost_1_53_0/boost/cstdint.hpp 2012-12-11 15:42:26.000000000 +0100
+++ boost_1_53_0.new/boost/cstdint.hpp 2013-08-18 21:52:30.861956037 +0200
@@ -41,7 +41,10 @@
// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
//
-#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
+#if defined(BOOST_HAS_STDINT_H) \
+ && (!defined(__GLIBC__) \
+ || defined(__GLIBC_HAVE_LONG_LONG) \
+ || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
// The following #include is an implementation artifact; not part of interface.
# ifdef __hpux

View File

@ -1,752 +0,0 @@
diff --git a/boost/context/detail/config.hpp b/boost/context/detail/config.hpp
--- a/boost/context/detail/config.hpp
+++ b/boost/context/detail/config.hpp
@@ -35,4 +35,15 @@
# include <boost/config/auto_link.hpp>
#endif
+#undef BOOST_CONTEXT_CALLDECL
+#if (defined(i386) || defined(__i386__) || defined(__i386) \
+ || defined(__i486__) || defined(__i586__) || defined(__i686__) \
+ || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
+ || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
+ || defined(_M_IX86) || defined(_I86_)) && defined(BOOST_WINDOWS)
+# define BOOST_CONTEXT_CALLDECL __cdecl
+#else
+# define BOOST_CONTEXT_CALLDECL
+#endif
+
#endif // BOOST_CONTEXT_DETAIL_CONFIG_H
diff --git a/boost/context/fcontext.hpp b/boost/context/fcontext.hpp
--- a/boost/context/fcontext.hpp
+++ b/boost/context/fcontext.hpp
@@ -24,51 +24,11 @@ typedef int intptr_t;
# include BOOST_ABI_PREFIX
#endif
-// x86_64
-// test x86_64 before i386 because icc might
-// define __i686__ for x86_64 too
-#if defined(__x86_64__) || defined(__x86_64) \
- || defined(__amd64__) || defined(__amd64) \
- || defined(_M_X64) || defined(_M_AMD64)
-# if defined(BOOST_WINDOWS)
-# include <boost/context/detail/fcontext_x86_64_win.hpp>
-# else
-# include <boost/context/detail/fcontext_x86_64.hpp>
-# endif
-// i386
-#elif defined(i386) || defined(__i386__) || defined(__i386) \
- || defined(__i486__) || defined(__i586__) || defined(__i686__) \
- || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
- || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
- || defined(_M_IX86) || defined(_I86_)
-# if defined(BOOST_WINDOWS)
-# include <boost/context/detail/fcontext_i386_win.hpp>
-# else
-# include <boost/context/detail/fcontext_i386.hpp>
-# endif
-// arm
-#elif defined(__arm__) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) \
- || defined(__TARGET_ARCH_THUMB) || defined(_ARM) || defined(_M_ARM)
-# include <boost/context/detail/fcontext_arm.hpp>
-// mips
-#elif (defined(__mips) && __mips == 1) || defined(_MIPS_ISA_MIPS1) \
- || defined(_R3000)
-# include <boost/context/detail/fcontext_mips.hpp>
-// powerpc
-#elif defined(__powerpc) || defined(__powerpc__) || defined(__ppc) \
- || defined(__ppc__) || defined(_ARCH_PPC) || defined(__POWERPC__) \
- || defined(__PPCGECKO__) || defined(__PPCBROADWAY) || defined(_XENON)
-# include <boost/context/detail/fcontext_ppc.hpp>
-#elif defined(__sparc__) || defined(__sparc)
-// sparc or sparc64
-# include <boost/context/detail/fcontext_sparc.hpp>
-#else
-# error "platform not supported"
-#endif
-
namespace boost {
namespace context {
+typedef void fcontext_t;
+
extern "C" BOOST_CONTEXT_DECL
intptr_t BOOST_CONTEXT_CALLDECL jump_fcontext( fcontext_t * ofc, fcontext_t const* nfc, intptr_t vp, bool preserve_fpu = true);
extern "C" BOOST_CONTEXT_DECL
diff --git a/libs/context/build/Jamfile.v2 b/libs/context/build/Jamfile.v2
--- a/libs/context/build/Jamfile.v2
+++ b/libs/context/build/Jamfile.v2
@@ -210,6 +210,16 @@ alias asm_context_sources
;
alias asm_context_sources
+ : asm/make_ppc64_linux_elf_gas.S
+ asm/jump_ppc64_linux_elf_gas.S
+ : <address-model>64
+ <architecture>power
+ <binary-format>elf
+ <target-os>linux
+ <toolset>gcc
+ ;
+
+alias asm_context_sources
: [ make asm/make_ppc64_sysv_elf_gas.o : asm/make_ppc64_sysv_elf_gas.S : @gas ]
[ make asm/jump_ppc64_sysv_elf_gas.o : asm/jump_ppc64_sysv_elf_gas.S : @gas ]
: <address-model>64
diff --git a/libs/context/src/asm/jump_ppc64_linux_elf_gas.S b/libs/context/src/asm/jump_ppc64_linux_elf_gas.S
--- /dev/null
+++ b/libs/context/src/asm/jump_ppc64_linux_elf_gas.S
@@ -0,0 +1,267 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ 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)
+*/
+
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | *
+ * ------------------------------------------------- *
+ * | F14 | F15 | F16 | F17 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | *
+ * ------------------------------------------------- *
+ * | F18 | F19 | F20 | F21 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | *
+ * ------------------------------------------------- *
+ * | F22 | F23 | F24 | F25 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | *
+ * ------------------------------------------------- *
+ * | F26 | F27 | F28 | F29 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | *
+ * ------------------------------------------------- *
+ * | F30 | F31 | fpscr | TOC | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * ------------------------------------------------- *
+ * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | *
+ * ------------------------------------------------- *
+ * | R14 | R15 | R16 | R17 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | *
+ * ------------------------------------------------- *
+ * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | *
+ * ------------------------------------------------- *
+ * | R18 | R19 | R20 | R21 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | *
+ * ------------------------------------------------- *
+ * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | *
+ * ------------------------------------------------- *
+ * | R22 | R23 | R24 | R25 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | *
+ * ------------------------------------------------- *
+ * | 256 | 260 | 264 | 268 | 272 | 276 | 280 | 284 | *
+ * ------------------------------------------------- *
+ * | R26 | R27 | R28 | R29 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | *
+ * ------------------------------------------------- *
+ * | 288 | 292 | 296 | 300 | 304 | 308 | 312 | 316 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | R30 | R31 | CR | LR | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 80 | 81 | | *
+ * ------------------------------------------------- *
+ * | 320 | 324 | | *
+ * ------------------------------------------------- *
+ * | PC | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.globl jump_fcontext
+#if _CALL_ELF == 2
+ .text
+ .align 2
+jump_fcontext:
+ addis %r2, %r12, .TOC.-jump_fcontext@ha
+ addi %r2, %r2, .TOC.-jump_fcontext@l
+ .localentry jump_fcontext, . - jump_fcontext
+#else
+ .section ".opd","aw"
+ .align 3
+jump_fcontext:
+# ifdef _CALL_LINUX
+ .quad .L.jump_fcontext,.TOC.@tocbase,0
+ .type jump_fcontext,@function
+ .text
+ .align 2
+.L.jump_fcontext:
+# else
+ .hidden .jump_fcontext
+ .globl .jump_fcontext
+ .quad .jump_fcontext,.TOC.@tocbase,0
+ .size jump_fcontext,24
+ .type .jump_fcontext,@function
+ .text
+ .align 2
+.jump_fcontext:
+# endif
+#endif
+ # reserve space on stack
+ subi %r1, %r1, 328
+
+#if _CALL_ELF != 2
+ std %r2, 152(%r1) # save TOC
+#endif
+ std %r14, 160(%r1) # save R14
+ std %r15, 168(%r1) # save R15
+ std %r16, 176(%r1) # save R16
+ std %r17, 184(%r1) # save R17
+ std %r18, 192(%r1) # save R18
+ std %r19, 200(%r1) # save R19
+ std %r20, 208(%r1) # save R20
+ std %r21, 216(%r1) # save R21
+ std %r22, 224(%r1) # save R22
+ std %r23, 232(%r1) # save R23
+ std %r24, 240(%r1) # save R24
+ std %r25, 248(%r1) # save R25
+ std %r26, 256(%r1) # save R26
+ std %r27, 264(%r1) # save R27
+ std %r28, 272(%r1) # save R28
+ std %r29, 280(%r1) # save R29
+ std %r30, 288(%r1) # save R30
+ std %r31, 296(%r1) # save R31
+
+ # save CR
+ mfcr %r0
+ std %r0, 304(%r1)
+ # save LR
+ mflr %r0
+ std %r0, 312(%r1)
+ # save LR as PC
+ std %r0, 320(%r1)
+
+ # test if fpu env should be preserved
+ cmpwi cr7, %r6, 0
+ beq cr7, 1f
+
+ stfd %f14, 0(%r1) # save F14
+ stfd %f15, 8(%r1) # save F15
+ stfd %f16, 16(%r1) # save F16
+ stfd %f17, 24(%r1) # save F17
+ stfd %f18, 32(%r1) # save F18
+ stfd %f19, 40(%r1) # save F19
+ stfd %f20, 48(%r1) # save F20
+ stfd %f21, 56(%r1) # save F21
+ stfd %f22, 64(%r1) # save F22
+ stfd %f23, 72(%r1) # save F23
+ stfd %f24, 80(%r1) # save F24
+ stfd %f25, 88(%r1) # save F25
+ stfd %f26, 96(%r1) # save F26
+ stfd %f27, 104(%r1) # save F27
+ stfd %f28, 112(%r1) # save F28
+ stfd %f29, 120(%r1) # save F29
+ stfd %f30, 128(%r1) # save F30
+ stfd %f31, 136(%r1) # save F31
+ mffs %f0 # load FPSCR
+ stfd %f0, 144(%r1) # save FPSCR
+
+1:
+ # store RSP (pointing to context-data) in R3
+ std %r1, 0(%r3)
+
+ # restore RSP (pointing to context-data) from R4
+ mr %r1, %r4
+
+ # test if fpu env should be preserved
+ cmpwi cr7, %r6, 0
+ beq cr7, 2f
+
+ lfd %f14, 0(%r1) # restore F14
+ lfd %f15, 8(%r1) # restore F15
+ lfd %f16, 16(%r1) # restore F16
+ lfd %f17, 24(%r1) # restore F17
+ lfd %f18, 32(%r1) # restore F18
+ lfd %f19, 40(%r1) # restore F19
+ lfd %f20, 48(%r1) # restore F20
+ lfd %f21, 56(%r1) # restore F21
+ lfd %f22, 64(%r1) # restore F22
+ lfd %f23, 72(%r1) # restore F23
+ lfd %f24, 80(%r1) # restore F24
+ lfd %f25, 88(%r1) # restore F25
+ lfd %f26, 96(%r1) # restore F26
+ lfd %f27, 104(%r1) # restore F27
+ lfd %f28, 112(%r1) # restore F28
+ lfd %f29, 120(%r1) # restore F29
+ lfd %f30, 128(%r1) # restore F30
+ lfd %f31, 136(%r1) # restore F31
+ lfd %f0, 144(%r1) # load FPSCR
+ mtfsf 0xff, %f0 # restore FPSCR
+
+2:
+#if _CALL_ELF != 2
+ ld %r2, 152(%r1) # restore TOC
+#endif
+ ld %r14, 160(%r1) # restore R14
+ ld %r15, 168(%r1) # restore R15
+ ld %r16, 176(%r1) # restore R16
+ ld %r17, 184(%r1) # restore R17
+ ld %r18, 192(%r1) # restore R18
+ ld %r19, 200(%r1) # restore R19
+ ld %r20, 208(%r1) # restore R20
+ ld %r21, 216(%r1) # restore R21
+ ld %r22, 224(%r1) # restore R22
+ ld %r23, 232(%r1) # restore R23
+ ld %r24, 240(%r1) # restore R24
+ ld %r25, 248(%r1) # restore R25
+ ld %r26, 256(%r1) # restore R26
+ ld %r27, 264(%r1) # restore R27
+ ld %r28, 272(%r1) # restore R28
+ ld %r29, 280(%r1) # restore R29
+ ld %r30, 288(%r1) # restore R30
+ ld %r31, 296(%r1) # restore R31
+
+ # restore CR
+ ld %r0, 304(%r1)
+ mtcr %r0
+ # restore LR
+ ld %r0, 312(%r1)
+ mtlr %r0
+
+ # load PC
+ ld %r12, 320(%r1)
+ # restore CTR
+ mtctr %r12
+
+ # adjust stack
+ addi %r1, %r1, 328
+
+ # use third arg as return value after jump
+ # use third arg as first arg in context function
+ mr %r3, %r5
+
+ # jump to context
+ bctr
+#if _CALL_ELF == 2
+ .size jump_fcontext, .-jump_fcontext
+#else
+# ifdef _CALL_LINUX
+ .size .jump_fcontext, .-.L.jump_fcontext
+# else
+ .size .jump_fcontext, .-.jump_fcontext
+# endif
+#endif
+
+
+/* Mark that we don't need executable stack. */
+.section .note.GNU-stack,"",%progbits
diff --git a/libs/context/src/asm/make_ppc64_linux_elf_gas.S b/libs/context/src/asm/make_ppc64_linux_elf_gas.S
--- /dev/null
+++ b/libs/context/src/asm/make_ppc64_linux_elf_gas.S
@@ -0,0 +1,189 @@
+/*
+ Copyright Oliver Kowalke 2009.
+ 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)
+*/
+
+/*******************************************************
+ * *
+ * ------------------------------------------------- *
+ * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | *
+ * ------------------------------------------------- *
+ * | 0 | 4 | 8 | 12 | 16 | 20 | 24 | 28 | *
+ * ------------------------------------------------- *
+ * | F14 | F15 | F16 | F17 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | *
+ * ------------------------------------------------- *
+ * | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | *
+ * ------------------------------------------------- *
+ * | F18 | F19 | F20 | F21 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | *
+ * ------------------------------------------------- *
+ * | 64 | 68 | 72 | 76 | 80 | 84 | 88 | 92 | *
+ * ------------------------------------------------- *
+ * | F22 | F23 | F24 | F25 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | *
+ * ------------------------------------------------- *
+ * | 96 | 100 | 104 | 108 | 112 | 116 | 120 | 124 | *
+ * ------------------------------------------------- *
+ * | F26 | F27 | F28 | F29 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | *
+ * ------------------------------------------------- *
+ * | 128 | 132 | 136 | 140 | 144 | 148 | 152 | 156 | *
+ * ------------------------------------------------- *
+ * | F30 | F31 | fpscr | TOC | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | *
+ * ------------------------------------------------- *
+ * | 160 | 164 | 168 | 172 | 176 | 180 | 184 | 188 | *
+ * ------------------------------------------------- *
+ * | R14 | R15 | R16 | R17 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | *
+ * ------------------------------------------------- *
+ * | 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | *
+ * ------------------------------------------------- *
+ * | R18 | R19 | R20 | R21 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | *
+ * ------------------------------------------------- *
+ * | 224 | 228 | 232 | 236 | 240 | 244 | 248 | 252 | *
+ * ------------------------------------------------- *
+ * | R22 | R23 | R24 | R25 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | *
+ * ------------------------------------------------- *
+ * | 256 | 260 | 264 | 268 | 272 | 276 | 280 | 284 | *
+ * ------------------------------------------------- *
+ * | R26 | R27 | R28 | R29 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | *
+ * ------------------------------------------------- *
+ * | 288 | 292 | 296 | 300 | 304 | 308 | 312 | 316 | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | R30 | R31 | CR | LR | *
+ * ------------------------------------------------- *
+ * ------------------------------------------------- *
+ * | 80 | 81 | | *
+ * ------------------------------------------------- *
+ * | 320 | 324 | | *
+ * ------------------------------------------------- *
+ * | PC | | *
+ * ------------------------------------------------- *
+ * *
+ *******************************************************/
+
+.globl make_fcontext
+#if _CALL_ELF == 2
+ .text
+ .align 2
+make_fcontext:
+ addis %r2, %r12, .TOC.-make_fcontext@ha
+ addi %r2, %r2, .TOC.-make_fcontext@l
+ .localentry make_fcontext, . - make_fcontext
+#else
+ .section ".opd","aw"
+ .align 3
+make_fcontext:
+# ifdef _CALL_LINUX
+ .quad .L.make_fcontext,.TOC.@tocbase,0
+ .type make_fcontext,@function
+ .text
+ .align 2
+.L.make_fcontext:
+# else
+ .hidden .make_fcontext
+ .globl .make_fcontext
+ .quad .make_fcontext,.TOC.@tocbase,0
+ .size make_fcontext,24
+ .type .make_fcontext,@function
+ .text
+ .align 2
+.make_fcontext:
+# endif
+#endif
+ # save return address into R6
+ mflr %r6
+
+ # first arg of make_fcontext() == top address of context-stack
+ # shift address in R3 to lower 16 byte boundary
+ clrrdi %r3, %r3, 4
+
+ # reserve space for context-data on context-stack
+ # including 64 byte of linkage + parameter area (R1 % 16 == 0)
+ subi %r3, %r3, 392
+
+ # third arg of make_fcontext() == address of context-function
+ # entry point (ELFv2) or descriptor (ELFv1)
+#if _CALL_ELF == 2
+ # save address of context-function entry point
+ std %r5, 320(%r3)
+#else
+ # save address of context-function entry point
+ ld %r4, 0(%r5)
+ std %r4, 320(%r3)
+ # save TOC of context-function
+ ld %r4, 8(%r5)
+ std %r4, 152(%r3)
+#endif
+
+ # load LR
+ mflr %r0
+ # jump to label 1
+ bl 1f
+1:
+ # load LR into R4
+ mflr %r4
+ # compute abs address of label finish
+ addi %r4, %r4, finish - 1b
+ # restore LR
+ mtlr %r0
+ # save address of finish as return-address for context-function
+ # will be entered after context-function returns
+ std %r4, 312(%r3)
+
+ # restore return address from R6
+ mtlr %r6
+
+ blr # return pointer to context-data
+
+finish:
+ # save return address into R0
+ mflr %r0
+ # save return address on stack, set up stack frame
+ std %r0, 8(%r1)
+ # allocate stack space, R1 % 16 == 0
+ stdu %r1, -32(%r1)
+
+ # exit code is zero
+ li %r3, 0
+ # exit application
+ bl _exit
+ nop
+#if _CALL_ELF == 2
+ .size make_fcontext, .-make_fcontext
+#else
+# ifdef _CALL_LINUX
+ .size .make_fcontext, .-.L.make_fcontext
+# else
+ .size .make_fcontext, .-.make_fcontext
+# endif
+#endif
+
+/* Mark that we don't need executable stack. */
+.section .note.GNU-stack,"",%progbits
diff --git a/libs/context/test/test_context.cpp b/libs/context/test/test_context.cpp
--- a/libs/context/test/test_context.cpp
+++ b/libs/context/test/test_context.cpp
@@ -27,8 +27,10 @@ typedef ctx::simple_stack_allocator<
8 * 1024 // 8kB
> stack_allocator;
-ctx::fcontext_t fcm;
-ctx::fcontext_t * fc = 0;
+ctx::fcontext_t *fcm = 0;
+ctx::fcontext_t *fc = 0;
+ctx::fcontext_t *fc1 = 0;
+ctx::fcontext_t *fc2 = 0;
int value1 = 0;
std::string value2;
double value3 = 0.;
@@ -36,25 +38,25 @@ double value3 = 0.;
void f1( intptr_t)
{
++value1;
- ctx::jump_fcontext( fc, & fcm, 0);
+ ctx::jump_fcontext( & fc, fcm, 0);
}
void f3( intptr_t)
{
++value1;
- ctx::jump_fcontext( fc, & fcm, 0);
+ ctx::jump_fcontext( & fc, fcm, 0);
++value1;
- ctx::jump_fcontext( fc, & fcm, 0);
+ ctx::jump_fcontext( & fc, fcm, 0);
}
void f4( intptr_t)
{
- ctx::jump_fcontext( fc, & fcm, 7);
+ ctx::jump_fcontext( & fc, fcm, 7);
}
void f5( intptr_t arg)
{
- ctx::jump_fcontext( fc, & fcm, arg);
+ ctx::jump_fcontext( & fc, fcm, arg);
}
void f6( intptr_t arg)
@@ -62,9 +64,9 @@ void f6( intptr_t arg)
std::pair< int, int > data = * ( std::pair< int, int > * ) arg;
int res = data.first + data.second;
data = * ( std::pair< int, int > *)
- ctx::jump_fcontext( fc, & fcm, ( intptr_t) res);
+ ctx::jump_fcontext( & fc, fcm, ( intptr_t) res);
res = data.first + data.second;
- ctx::jump_fcontext( fc, & fcm, ( intptr_t) res);
+ ctx::jump_fcontext( & fc, fcm, ( intptr_t) res);
}
void f7( intptr_t arg)
@@ -73,7 +75,7 @@ void f7( intptr_t arg)
{ throw std::runtime_error( ( char *) arg); }
catch ( std::runtime_error const& e)
{ value2 = e.what(); }
- ctx::jump_fcontext( fc, & fcm, arg);
+ ctx::jump_fcontext( & fc, fcm, arg);
}
void f8( intptr_t arg)
@@ -81,7 +83,24 @@ void f8( intptr_t arg)
double d = * ( double *) arg;
d += 3.45;
value3 = d;
- ctx::jump_fcontext( fc, & fcm, 0);
+ ctx::jump_fcontext( & fc, fcm, 0);
+}
+
+void f10( intptr_t)
+{
+ value1 = 3;
+ ctx::jump_fcontext( & fc2, fc1, 0);
+}
+
+void f9( intptr_t)
+{
+ std::cout << "f1: entered" << std::endl;
+
+ stack_allocator alloc;
+ void * sp = alloc.allocate( stack_allocator::default_stacksize());
+ fc2 = ctx::make_fcontext( sp, stack_allocator::default_stacksize(), f10);
+ ctx::jump_fcontext( & fc1, fc2, 0);
+ ctx::jump_fcontext( & fc1, fcm, 0);
}
void test_setup()
@@ -91,8 +110,6 @@ void test_setup()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f1);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
}
void test_start()
@@ -104,8 +121,6 @@ void test_start()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f1);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
BOOST_CHECK_EQUAL( 0, value1);
ctx::jump_fcontext( & fcm, fc, 0);
@@ -121,8 +136,6 @@ void test_jump()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f3);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
BOOST_CHECK_EQUAL( 0, value1);
ctx::jump_fcontext( & fcm, fc, 0);
@@ -138,8 +151,6 @@ void test_result()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f4);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
int result = ( int) ctx::jump_fcontext( & fcm, fc, 0);
BOOST_CHECK_EQUAL( 7, result);
@@ -153,8 +164,6 @@ void test_arg()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f5);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
int result = ( int) ctx::jump_fcontext( & fcm, fc, i);
BOOST_CHECK_EQUAL( i, result);
@@ -168,8 +177,6 @@ void test_transfer()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f6);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
int result = ( int) ctx::jump_fcontext( & fcm, fc, ( intptr_t) & data);
BOOST_CHECK_EQUAL( 10, result);
@@ -184,10 +191,8 @@ void test_exception()
const char * what = "hello world";
void * sp = alloc.allocate( stack_allocator::default_stacksize() );
- fc = ctx::make_fcontext( sp, stack_allocator::default_stacksize(), f7);
+ fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f7);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::default_stacksize(), fc->fc_stack.size);
ctx::jump_fcontext( & fcm, fc, ( intptr_t) what);
BOOST_CHECK_EQUAL( std::string( what), value2);
@@ -201,13 +206,21 @@ void test_fp()
void * sp = alloc.allocate( stack_allocator::minimum_stacksize() );
fc = ctx::make_fcontext( sp, stack_allocator::minimum_stacksize(), f8);
BOOST_CHECK( fc);
- BOOST_CHECK_EQUAL( sp, fc->fc_stack.sp);
- BOOST_CHECK_EQUAL( stack_allocator::minimum_stacksize(), fc->fc_stack.size);
ctx::jump_fcontext( & fcm, fc, (intptr_t) & d);
BOOST_CHECK_EQUAL( 10.58, value3);
}
+void test_stacked()
+{
+ value1 = 0;
+ stack_allocator alloc;
+ void * sp = alloc.allocate( stack_allocator::default_stacksize());
+ fc1 = ctx::make_fcontext( sp, stack_allocator::default_stacksize(), f9);
+ ctx::jump_fcontext( & fcm, fc1, 0);
+ BOOST_CHECK_EQUAL( 3, value1);
+}
+
boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
{
boost::unit_test::test_suite * test =
@@ -221,6 +234,7 @@ boost::unit_test::test_suite * init_unit_test_suite( int, char* [])
test->add( BOOST_TEST_CASE( & test_transfer) );
test->add( BOOST_TEST_CASE( & test_exception) );
test->add( BOOST_TEST_CASE( & test_fp) );
+ test->add( BOOST_TEST_CASE( & test_stacked) );
return test;
}

View File

@ -1,80 +0,0 @@
diff --git a/boost/coroutine/detail/coroutine_context.hpp b/boost/coroutine/detail/coroutine_context.hpp
--- a/boost/coroutine/detail/coroutine_context.hpp
+++ b/boost/coroutine/detail/coroutine_context.hpp
@@ -34,27 +34,33 @@ namespace boost {
namespace coroutines {
namespace detail {
-
-class BOOST_COROUTINES_DECL coroutine_context : private context::fcontext_t,
- private stack_context
+// class hold stack-context and coroutines execution-context
+class BOOST_COROUTINES_DECL coroutine_context
{
private:
- stack_context * stack_ctx_;
- context::fcontext_t * ctx_;
+ stack_context stack_ctx_;
+ context::fcontext_t *ctx_;
public:
typedef void( * ctx_fn)( intptr_t);
+ // default ctor represents the current execution-context
coroutine_context();
- explicit coroutine_context( ctx_fn, stack_context *);
+ // ctor creates a new execution-context running coroutine-fn `fn`
+ // `ctx_` will be allocated on top of the stack managed by parameter
+ // `stack_ctx`
+ coroutine_context( ctx_fn fn, stack_context const& stack_ctx);
coroutine_context( coroutine_context const&);
coroutine_context& operator=( coroutine_context const&);
intptr_t jump( coroutine_context &, intptr_t = 0, bool = true);
+
+ stack_context & stack_ctx()
+ { return stack_ctx_; }
};
}}}
diff --git a/libs/coroutine/src/detail/coroutine_context.cpp b/libs/coroutine/src/detail/coroutine_context.cpp
--- a/libs/coroutine/src/detail/coroutine_context.cpp
+++ b/libs/coroutine/src/detail/coroutine_context.cpp
@@ -34,20 +34,20 @@ namespace coroutines {
namespace detail {
coroutine_context::coroutine_context() :
- fcontext_t(), stack_ctx_( this), ctx_( this)
+ stack_ctx_(),
+ ctx_( 0)
{
#if defined(BOOST_USE_SEGMENTED_STACKS)
__splitstack_getcontext( stack_ctx_->segments_ctx);
#endif
}
-coroutine_context::coroutine_context( ctx_fn fn, stack_context * stack_ctx) :
- fcontext_t(), stack_ctx_( stack_ctx),
- ctx_( context::make_fcontext( stack_ctx_->sp, stack_ctx_->size, fn) )
+coroutine_context::coroutine_context( ctx_fn fn, stack_context const& stack_ctx) :
+ stack_ctx_( stack_ctx),
+ ctx_( context::make_fcontext( stack_ctx_.sp, stack_ctx_.size, fn) )
{}
coroutine_context::coroutine_context( coroutine_context const& other) :
- fcontext_t(),
stack_ctx_( other.stack_ctx_),
ctx_( other.ctx_)
{}
@@ -79,7 +79,7 @@ coroutine_context::jump( coroutine_context & other, intptr_t param, bool preserv
return ret;
#else
- return context::jump_fcontext( ctx_, other.ctx_, param, preserve_fpu);
+ return context::jump_fcontext( & ctx_, other.ctx_, param, preserve_fpu);
#endif
}

View File

@ -1,13 +1,13 @@
Index: boost/config/compiler/gcc.hpp
Index: boost_1_56_0/boost/config/compiler/gcc.hpp
===================================================================
--- boost/config/compiler/gcc.hpp.orig 2010-07-01 13:59:21.000000000 +0200
+++ boost/config/compiler/gcc.hpp 2010-08-24 14:01:18.000000000 +0200
@@ -93,7 +93,7 @@
--- boost_1_56_0.orig/boost/config/compiler/gcc.hpp
+++ boost_1_56_0/boost/config/compiler/gcc.hpp
@@ -68,7 +68,7 @@
// those platforms where we can know for sure). It will get turned off again
// later if no threading API is detected.
//
-#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
+#if !defined(__MINGW32__)
+#if !defined(__MINGW32__)
# define BOOST_HAS_THREADS
#endif
#endif

View File

@ -1,6 +1,8 @@
--- tools/build/v2/tools/boostbook.jam.orig 2013-05-21 07:14:18.000000000 +0300
+++ tools/build/v2/tools/boostbook.jam 2013-09-18 19:28:13.132000026 +0300
@@ -550,40 +550,7 @@
Index: boost_1_56_0/tools/build/src/tools/boostbook.jam
===================================================================
--- boost_1_56_0.orig/tools/build/src/tools/boostbook.jam
+++ boost_1_56_0/tools/build/src/tools/boostbook.jam
@@ -548,40 +548,7 @@ rule generate-xml-catalog ( target : sou
" <rewriteURI uriStartString=\"http://www.boost.org/tools/boostbook/dtd/\" rewritePrefix=\"file://$(boostbook-dtd-dir)/\"/>"
: true ;

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Thu Aug 14 15:06:49 UTC 2014 - dmitry_r@opensuse.org
- Update to version 1.56.0. Major changes since 1.54.0:
New libraries:
* Predef: This library defines a set of compiler, architecture,
operating system, library, and other version numbers from the
information it can gather of C, C++, Objective C, and Objective
C++ predefined macros or those defined in generally available
headers, from Rene Rivera.
* Align: Memory alignment functions, allocators, and adaptors.
* Type_Index: Runtime/Compile time copyable type info.
For a detailed descriptions see:
http://www.boost.org/users/history/version_1_56_0.html
http://www.boost.org/users/history/version_1_55_0.html
- Rebase boost-thread.patch
- Rabase boost-use_std_xml_catalog.patch
- Rebase bjam-alignment.patch
- Remove obsolete boost-glibc-2.18.patch
- Remove obsolete boost-1.54-001-coroutine.patch
- Remove obsolete boost-1.54-002-date-time.patch
- Remove obsolete boost-1.54-003-log.patch
- Remove obsolete boost-1.54-change85160.patch
- Remove obsolete boost-1.54.0-thread-link_atomic.patch
- Remove obsolete boost-ppc64-abiv2-context.patch
- Remove obsolete boost-ppc64-abiv2-coroutine.patch
- Remove outdated man pages boost_1_54_man.tar.bz2
-------------------------------------------------------------------
Wed Jul 30 05:09:29 UTC 2014 - coolo@suse.com

View File

@ -16,10 +16,10 @@
#
%define ver 1.54.0
%define file_version 1_54_0
%define short_version 1_54
%define lib_appendix 1_54_0
%define ver 1.56.0
%define file_version 1_56_0
%define short_version 1_56
%define lib_appendix 1_56_0
#Only define to 1 to generate the man pages
%define build_docs 0
@ -56,8 +56,9 @@
%define boost_libs5 libboost_wave%{lib_appendix} libboost_regex%{lib_appendix} libboost_regex%{lib_appendix}
%define boost_libs6 libboost_random%{lib_appendix} libboost_chrono%{lib_appendix} libboost_locale%{lib_appendix}
%define boost_libs7 libboost_timer%{lib_appendix} libboost_atomic%{lib_appendix} libboost_log%{lib_appendix}
%define boost_libs8 libboost_container%{lib_appendix} libboost_coroutine%{lib_appendix}
%define most_libs %boost_libs1 %boost_libs2 %boost_libs3 %boost_libs4 %boost_libs5 %boost_libs6 %boost_libs7
%define most_libs %boost_libs1 %boost_libs2 %boost_libs3 %boost_libs4 %boost_libs5 %boost_libs6 %boost_libs7 %boost_libs8
%if %build_mpi
%define all_libs %{most_libs} libboost_graph_parallel%lib_appendix libboost_mpi%{lib_appendix}
@ -66,8 +67,28 @@
%endif
Name: boost
Version: 1.56.0
Release: 0
Summary: Boost C++ Libraries
License: BSL-1.0
Group: Development/Libraries/C and C++
Url: http://www.boost.org
Source0: http://downloads.sourceforge.net/project/boost/boost/%{version}/%{name}_%{file_version}.tar.bz2
Source1: boost-rpmlintrc
Source3: http://downloads.sourceforge.net/project/boost/boost-docs/%{version}/%{name}_%{short_version}_pdf.tar.bz2
Source4: existing_extra_docs
#Source5: NEWS
Source100: baselibs.conf
Patch1: boost-thread.patch
Patch2: boost-no_type_punning.patch
Patch3: boost-no_segfault_in_Regex_filter.patch
Patch4: boost-pool_check_overflow.patch
Patch5: boost-strict_aliasing.patch
Patch6: boost-use_std_xml_catalog.patch
Patch7: bjam-alignment.patch
BuildRequires: chrpath
BuildRequires: dos2unix
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
@ -86,46 +107,7 @@ BuildRequires: doxygen
BuildRequires: libxslt-tools
BuildRequires: texlive-latex
%endif
%if 0%suse_version > 1020
BuildRequires: fdupes
%endif
Url: http://www.boost.org
Summary: Boost C++ Libraries
License: BSL-1.0
Group: Development/Libraries/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Version: 1.54.0
Release: 0
Source0: http://downloads.sourceforge.net/project/boost/boost/%{version}/%{name}_%{file_version}.tar.bz2
Source1: boost-rpmlintrc
Source2: %{name}_%{short_version}_man.tar.bz2
Source3: http://downloads.sourceforge.net/project/boost/boost-docs/%{version}/%{name}_%{file_version}_pdf.tar.bz2
Source4: existing_extra_docs
#Source5: NEWS
Source100: baselibs.conf
Patch1: boost-thread.patch
Patch2: boost-no_type_punning.patch
Patch8: boost-no_segfault_in_Regex_filter.patch
Patch9: boost-pool_check_overflow.patch
Patch20: boost-strict_aliasing.patch
Patch50: boost-use_std_xml_catalog.patch
Patch60: boost-glibc-2.18.patch
Patch61: bjam-alignment.patch
#PATCH-FIX-UPSTREAM A post-release patch.
Patch71: boost-1.54-001-coroutine.patch
#PATCH-FIX-UPSTREAM A post-release patch.
Patch72: boost-1.54-002-date-time.patch
#PATCH-FIX-UPSTREAM A post-release patch.
Patch73: boost-1.54-003-log.patch
#PATCH-FIX-UPSTREAM https://svn.boost.org/trac/boost/ticket/8790
Patch74: boost-1.54-change85160.patch
#PATCH-FIX-UPSTREAM https://svn.boost.org/trac/boost/ticket/9041
Patch75: boost-1.54.0-thread-link_atomic.patch
#PATCH-FIX-UPSTREAM https://github.com/boost-at/boost_1_55_0/commit/4221b902fe3a3a9ff1e2d384acf46eceda782160
Patch76: boost-ppc64-abiv2-context.patch
#PATCH-FIX-UPSTREAM https://github.com/boost-at/boost_1_55_0/commit/e0fc16ec166c90564487f99078ed228e27828d2e
Patch77: boost-ppc64-abiv2-coroutine.patch
Recommends: %{all_libs}
%define _docdir %{_datadir}/doc/packages/boost-%{version}
@ -148,8 +130,6 @@ dynamic libraries are found in their respective package. For development
using Boost, you also need the boost-devel package. For documentation,
see the boost-doc package.
%package devel
Summary: Development package for Boost C++
Group: Development/Libraries/C and C++
@ -161,8 +141,6 @@ This package contains all that is needed to develop/compile
applications that use the Boost C++ libraries. For documentation see
the documentation packages (html, man or pdf).
%package -n boost-license%{lib_appendix}
Summary: Boost License
Group: Development/Libraries/C and C++
@ -171,11 +149,9 @@ Provides: boost-license = %{version}-%{release}
BuildArch: noarch
%endif
%description -n boost-license%{lib_appendix}
%description -n boost-license%{lib_appendix}
This package contains the license boost is provided under.
%package doc-html
Summary: HTML documentation for the Boost C++ Libraries
Group: Development/Libraries/C and C++
@ -187,22 +163,18 @@ BuildArch: noarch
This package contains the documentation of the boost dynamic libraries
in HTML format.
%package doc-man
Summary: Man documentation for the Boost C++ Libraries
Group: Development/Libraries/C and C++
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc-man
This package contains the documentation of the boost dynamic libraries
as man pages.
# %%package doc-man
# Summary: Man documentation for the Boost C++ Libraries
# Group: Development/Libraries/C and C++
# %%if 0%%{?suse_version} >= 1120
# BuildArch: noarch
# %%endif
#
# %%description doc-man
# This package contains the documentation of the boost dynamic libraries
# as man pages.
%if %package_pdf
%package doc-pdf
Summary: PDF documentation for the Boost C++ Libraries
Group: Development/Libraries/C and C++
@ -210,12 +182,12 @@ Group: Development/Libraries/C and C++
BuildArch: noarch
%endif
%description doc-pdf
%description doc-pdf
This package contains the documentation of the boost dynamic libraries
in PDF format.
%endif
%package -n libboost_atomic%{lib_appendix}
%package -n libboost_atomic%{lib_appendix}
Summary: Run-Time component of boost atomic library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
@ -225,7 +197,15 @@ Run-Time support for Boost.Atomic, a library that provides atomic data types
and operations on these data types, as well as memory ordering constraints
required for coordinating multiple threads through atomic variables.
%package -n libboost_context%{lib_appendix}
%package -n libboost_container%{lib_appendix}
Summary: Boost::Container Runtime libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_container%{lib_appendix}
This package contains the Boost Container runtime libraries.
%package -n libboost_context%{lib_appendix}
Summary: Run-Time component of boost context switching library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
@ -234,7 +214,15 @@ Requires: boost-license%{lib_appendix}
Run-Time support for Boost.Context, a foundational library that
provides a sort of cooperative multitasking on a single thread.
%package -n libboost_date_time%{lib_appendix}
%package -n libboost_coroutine%{lib_appendix}
Summary: Boost::Coroutine Runtime libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_coroutine%{lib_appendix}
This package contains the Boost Coroutine runtime libraries.
%package -n libboost_date_time%{lib_appendix}
Summary: Boost::Date.Time Runtime libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
@ -242,42 +230,39 @@ Requires: boost-license%{lib_appendix}
%description -n libboost_date_time%{lib_appendix}
This package contains the Boost Date.Time runtime libraries.
%package -n libboost_filesystem%{lib_appendix}
Summary: Boost::Filesystem Runtime Libraries
Group: System/Localization
Requires: boost-license%{lib_appendix}
%description -n libboost_filesystem%{lib_appendix}
%description -n libboost_filesystem%{lib_appendix}
This package contains the Boost::Filesystem libraries.
%package -n libboost_graph%{lib_appendix}
%package -n libboost_graph%{lib_appendix}
Summary: Boost::Graph Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_graph%{lib_appendix}
%description -n libboost_graph%{lib_appendix}
This package contains the Boost::Graph Runtime libraries.
%package -n libboost_graph_parallel%lib_appendix
%package -n libboost_graph_parallel%lib_appendix
Summary: Boost graph::distributed runtime libraries
Group: System/Libraries
Requires: boost-license%lib_appendix
%description -n libboost_graph_parallel%lib_appendix
%description -n libboost_graph_parallel%lib_appendix
This package contains the boost::graph::distributed runtime libraries.
%package -n libboost_iostreams%{lib_appendix}
%package -n libboost_iostreams%{lib_appendix}
Summary: Boost::IOStreams Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_iostreams%{lib_appendix}
%description -n libboost_iostreams%{lib_appendix}
This package contains the Boost::IOStreams Runtime libraries.
%package -n libboost_log%{lib_appendix}
%package -n libboost_log%{lib_appendix}
Summary: Run-Time component of boost logging library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
@ -287,164 +272,140 @@ Boost.Log library aims to make logging significantly easier for the
application developer. It provides a wide range of out-of-the-box
tools along with public interfaces for extending the library.
%package -n libboost_math%{lib_appendix}
%package -n libboost_math%{lib_appendix}
Summary: Boost::Math Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_math%{lib_appendix}
%description -n libboost_math%{lib_appendix}
This package contains the Boost::Math Runtime libraries.
%if %build_mpi
%package -n libboost_mpi%{lib_appendix}
%package -n libboost_mpi%{lib_appendix}
Summary: Boost::MPI Runtime libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_mpi%{lib_appendix}
%description -n libboost_mpi%{lib_appendix}
This package contains the Boost::MPI Runtime libraries.
%endif
%package -n libboost_test%{lib_appendix}
%package -n libboost_test%{lib_appendix}
Summary: Boost::Test Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_test%{lib_appendix}
%description -n libboost_test%{lib_appendix}
This package contains the Boost::Test runtime libraries.
%package -n libboost_program_options%{lib_appendix}
%package -n libboost_program_options%{lib_appendix}
Summary: Boost::ProgramOptions Runtime libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_program_options%{lib_appendix}
%description -n libboost_program_options%{lib_appendix}
This package contains the Boost::ProgramOptions Runtime libraries.
%package -n libboost_python%{lib_appendix}
%package -n libboost_python%{lib_appendix}
Summary: Boost::Python Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_python%{lib_appendix}
%description -n libboost_python%{lib_appendix}
This package contains the Boost::Python Runtime libraries.
%package -n libboost_serialization%{lib_appendix}
%package -n libboost_serialization%{lib_appendix}
Summary: Boost::Serialization Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_serialization%{lib_appendix}
%description -n libboost_serialization%{lib_appendix}
This package contains the Boost::Serialization Runtime libraries.
%package -n libboost_signals%{lib_appendix}
%package -n libboost_signals%{lib_appendix}
Summary: Boost::Signals Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_signals%{lib_appendix}
%description -n libboost_signals%{lib_appendix}
This package contains the Boost::Signals Runtime libraries.
%package -n libboost_system%{lib_appendix}
%package -n libboost_system%{lib_appendix}
Summary: Boost::System Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_system%{lib_appendix}
%description -n libboost_system%{lib_appendix}
This package contains the Boost::System runtime libraries.
%package -n libboost_thread%{lib_appendix}
%package -n libboost_thread%{lib_appendix}
Summary: Boost::Thread Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_thread%{lib_appendix}
%description -n libboost_thread%{lib_appendix}
This package contains the Boost::Thread runtime libraries.
%package -n libboost_wave%{lib_appendix}
%package -n libboost_wave%{lib_appendix}
Summary: Boost::Wave Runtime Libraries
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_wave%{lib_appendix}
%description -n libboost_wave%{lib_appendix}
This package contains the Boost::Wave runtime libraries.
%package -n libboost_regex%{lib_appendix}
%package -n libboost_regex%{lib_appendix}
Summary: The Boost::Regex runtime library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_regex%{lib_appendix}
%description -n libboost_regex%{lib_appendix}
This package contains the Boost::Regex runtime library.
%package -n libboost_random%{lib_appendix}
%package -n libboost_random%{lib_appendix}
Summary: The Boost::Random runtime library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_random%{lib_appendix}
%description -n libboost_random%{lib_appendix}
This package contains the Boost::Random runtime library.
%package -n libboost_chrono%{lib_appendix}
%package -n libboost_chrono%{lib_appendix}
Summary: The Boost::Chrono runtime library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_chrono%{lib_appendix}
%description -n libboost_chrono%{lib_appendix}
This package contains the Boost::Chrono runtime library.
%package -n libboost_locale%{lib_appendix}
%package -n libboost_locale%{lib_appendix}
Summary: The Boost::Locale runtime library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_locale%{lib_appendix}
%description -n libboost_locale%{lib_appendix}
This package contains the Boost::Locale runtime library.
%package -n libboost_timer%{lib_appendix}
%package -n libboost_timer%{lib_appendix}
Summary: The Boost::Timer runtime library
Group: System/Libraries
Requires: boost-license%{lib_appendix}
%description -n libboost_timer%{lib_appendix}
%description -n libboost_timer%{lib_appendix}
This package contains the Boost::Timer runtime library.
%prep
%if %build_docs
%setup -q -n %{name}_%{file_version} -b 3
%else
%setup -q -n %{name}_%{file_version} -a 2 -b 3
%endif
#everything in the tarball has the executable flag set ...
find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {} +
%patch1
%patch1 -p1
%patch2
%patch8
%patch9
%patch20
%patch50
%patch60 -p1
%patch61 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p0
%patch75 -p1
%patch76 -p1
%patch77 -p1
%patch3
%patch4
%patch5
%patch6 -p1
%patch7 -p1
#stupid build machinery copies .orig files
find . -name \*.orig -exec rm {} +
@ -513,7 +474,10 @@ EOF
cat << EOF >user-config.jam
using xsltproc ;
using boostbook : /usr/share/xml/docbook/stylesheet/nwalsh/current ;
using boostbook
: /usr/share/xml/docbook/stylesheet/nwalsh/current
: /usr/share/xml/docbook/schema/dtd/4.2
;
using doxygen ;
EOF
@ -530,7 +494,7 @@ EOF
%if %build_docs
cd doc
../b2 ${BJAM_CONFIG} --user-config=../user-config.jam --v2 man
../b2 --user-config=../user-config.jam --v2 man
%endif
%install
@ -564,17 +528,17 @@ done
popd
# install the man pages
rm -rf doc/man/man3/boost::units::operator
mv doc/man/man3/path.3 doc/man/man3/boost::property_tree::path.3
mv doc/man/man3/string.3 doc/man/man3/boost::container::string.3
for sec in 3 7 9; do
install -d %buildroot/%{_mandir}/man${sec}
done
pushd doc/man
rm -f *.manifest
tar -cf - .| tar -C %{buildroot}/%{_mandir} -xvf -
popd
# rm -rf doc/man/man3/boost::units::operator
# mv doc/man/man3/path.3 doc/man/man3/boost::property_tree::path.3
# mv doc/man/man3/string.3 doc/man/man3/boost::container::string.3
#
# for sec in 3 7 9; do
# install -d %%buildroot/%%{_mandir}/man${sec}
# done
# pushd doc/man
# rm -f *.manifest
# tar -cf - .| tar -C %%{buildroot}/%%{_mandir} -xvf -
# popd
#install doc files
dos2unix libs/ptr_container/doc/tutorial_example.html \
@ -593,15 +557,15 @@ ln -s ../LICENSE_1_0.txt %{buildroot}%{_docdir}/libs
#cp %%{S:5} %%{buildroot}%%{_docdir}
#only for documentation, doesn't need to be executable
find %{buildroot}%{_docdir} -name \*.py -exec chmod -x {} +
chmod -x ../%{name}_%{file_version}_pdf/*.pdf
chmod -x ../%{name}_%{short_version}_pdf/*.pdf
rm -f %{buildroot}%{_libdir}/*.a
#symlink dupes
%if 0%suse_version > 1020
%fdupes %buildroot
%endif
%post -n libboost_atomic%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_container%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_context%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_coroutine%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_date_time%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_filesystem%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_iostreams%{lib_appendix} -p /sbin/ldconfig
@ -614,11 +578,9 @@ rm -f %{buildroot}%{_libdir}/*.a
%post -n libboost_signals%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_thread%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_math%{lib_appendix} -p /sbin/ldconfig
%if %build_mpi
%post -n libboost_mpi%{lib_appendix} -p /sbin/ldconfig
%endif
%post -n libboost_graph%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_system%{lib_appendix} -p /sbin/ldconfig
%post -n libboost_wave%{lib_appendix} -p /sbin/ldconfig
@ -629,7 +591,9 @@ rm -f %{buildroot}%{_libdir}/*.a
%post -n libboost_graph_parallel%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_atomic%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_container%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_context%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_coroutine%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_date_time%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_filesystem%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_iostreams%{lib_appendix} -p /sbin/ldconfig
@ -642,11 +606,9 @@ rm -f %{buildroot}%{_libdir}/*.a
%postun -n libboost_signals%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_thread%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_math%{lib_appendix} -p /sbin/ldconfig
%if %build_mpi
%postun -n libboost_mpi%{lib_appendix} -p /sbin/ldconfig
%endif
%postun -n libboost_graph%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_system%{lib_appendix} -p /sbin/ldconfig
%postun -n libboost_wave%{lib_appendix} -p /sbin/ldconfig
@ -666,12 +628,20 @@ rm -f %{buildroot}%{_libdir}/*.a
%defattr(-, root, root, -)
%{_libdir}/libboost_atomic*.so.*
%files -n libboost_container%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_container*.so.*
%if %build_context
%files -n libboost_context%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_context*.so.*
%endif
%files -n libboost_coroutine%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_coroutine*.so.*
%files -n libboost_date_time%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_date_time*.so.*
@ -701,7 +671,6 @@ rm -f %{buildroot}%{_libdir}/*.a
%{_libdir}/libboost_math_*.so.*
%if %build_mpi
%files -n libboost_mpi%{lib_appendix}
%defattr(-, root, root, -)
%{_libdir}/libboost_mpi*.so.*
@ -771,17 +740,16 @@ rm -f %{buildroot}%{_libdir}/*.a
%doc %{_docdir}/*
%exclude %{_docdir}/LICENSE_1_0.txt
%files doc-man
%defattr(644, root, root, -)
%doc %{_mandir}/man3/*.3.gz
%doc %{_mandir}/man7/*.7.gz
%doc %{_mandir}/man9/*.9.gz
# %%files doc-man
# %%defattr(644, root, root, -)
# %%doc %%{_mandir}/man3/*.3.gz
# %%doc %%{_mandir}/man7/*.7.gz
# %%doc %%{_mandir}/man9/*.9.gz
%if %package_pdf
%files doc-pdf
%defattr(-, root, root, -)
%doc ../%{name}_%{file_version}_pdf/*.pdf
%doc ../%{name}_%{short_version}_pdf/*.pdf
%endif
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:047e927de336af106a24bceba30069980c191529fd76b8dff8eb9a328b48ae1d
size 57873778

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:59d53ee68f502e26ce40c980bff6599d68c612ea2a7dbdc5b018735e20b7f5a5
size 30499724

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fd5aa35b25f6ed106cd24997e785f4f2f54886f02e0b355a2f637f8b4307b04c
size 418939

3
boost_1_56_0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:134732acaf3a6e7eba85988118d943f0fa6b7f0850f65131fff89823ad30ff1d
size 94777674

3
boost_1_56_pdf.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:469bcdd5fbc8372910c7e6e6dbee650fb609a475ae05a365ad3159fc3a84f7b4
size 42035088