diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 49650fa..6306371 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -22,6 +22,8 @@ project boost/coroutine gcc-4.8,on:"-static-libgcc" gcc-4.9,on:-fsplit-stack gcc-4.9,on:"-static-libgcc" + clang-3.4,on:-fsplit-stack + clang-3.4,on:"-static-libgcc" shared:BOOST_COROUTINES_DYN_LINK=1 BOOST_COROUTINES_SOURCE : usage-requirements diff --git a/doc/stack.qbk b/doc/stack.qbk index 26907b4..12a0279 100644 --- a/doc/stack.qbk +++ b/doc/stack.qbk @@ -151,10 +151,12 @@ Class __segmented_allocator__ models the __stack_allocator_concept__. In contrast to __protected_allocator__ and __standard_allocator__ it creates a stack which grows on demand. -[note Segmented stacks are currently only supported by [*gcc] from version [*4.7] -onwards. In order to use a __segmented_stack__ __boost_coroutine__ must be built -with [*toolset=gcc segmented-stacks=on] at b2/bjam command-line. Applications -must be compiled with compiler-flags [*-fsplit-stack -DBOOST_USE_SEGMENTED_STACKS].] +[note Segmented stacks are currently only supported by [*gcc] from version +[*4.7] [*clang] from version [*3.4] onwards. In order to use a +__segmented_stack__ __boost_coroutine__ must be built with +[*toolset=gcc segmented-stacks=on] at b2/bjam command-line. Applications +must be compiled with compiler-flags +[*-fsplit-stack -DBOOST_USE_SEGMENTED_STACKS].] #include diff --git a/example/cpp03/asymmetric/Jamfile.v2 b/example/cpp03/asymmetric/Jamfile.v2 index 1a7f39c..8029d0f 100644 --- a/example/cpp03/asymmetric/Jamfile.v2 +++ b/example/cpp03/asymmetric/Jamfile.v2 @@ -25,6 +25,8 @@ project boost/coroutine/example gcc-4.8,on:-DBOOST_USE_SEGMENTED_STACKS gcc-4.9,on:-fsplit-stack gcc-4.9,on:-DBOOST_USE_SEGMENTED_STACKS + clang-3.4,on:-fsplit-stack + clang-3.4,on:-DBOOST_USE_SEGMENTED_STACKS static multi ; diff --git a/include/boost/coroutine/detail/config.hpp b/include/boost/coroutine/detail/config.hpp index e647f1e..572b221 100644 --- a/include/boost/coroutine/detail/config.hpp +++ b/include/boost/coroutine/detail/config.hpp @@ -36,7 +36,8 @@ #endif #if defined(BOOST_USE_SEGMENTED_STACKS) -# if ! (defined(__GNUC__) && __GNUC__ > 3 && __GNUC_MINOR__ > 6) +# if ! ( (defined(__GNUC__) && __GNUC__ > 3 && __GNUC_MINOR__ > 6) || \ + (defined(__clang__) && __clang_major__ > 2 && __clang_minor__ > 3) ) # error "compiler does not support segmented stacks" # endif # define BOOST_COROUTINES_SEGMENTS 10