diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2016-12-30 15:58:03 -0500 |
---|---|---|
committer | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2016-12-30 16:16:14 -0500 |
commit | e9d60c5636a8ba2a9685a741d06641a4b86398f9 (patch) | |
tree | d12e57dcaa148a2911949a2e45629a34586afb91 /pkgs/development/compilers | |
parent | 2cac3742415a1fd32438be8bb4300a9ceb5d7dd6 (diff) | |
download | nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar.gz nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar.bz2 nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar.lz nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar.xz nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.tar.zst nixlib-e9d60c5636a8ba2a9685a741d06641a4b86398f9.zip |
libc++3.7: fix to use with modern compilers
Modern compiler will issue a following error whenever '#include <string>' is done: /nix/store/yxpwamjdapjcp53mmsdh1j2c9bc26h4k-libc++-3.7.1/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)' basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) ^ /nix/store/yxpwamjdapjcp53mmsdh1j2c9bc26h4k-libc++-3.7.1/include/c++/v1/string:1326:40: note: previous declaration is here _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ 1 error generated. This happens because modern clang is more strict about checking exception specification for forward declaration and definition. http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?r1=242056&r2=242623&diff_format=h
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/llvm/3.7/libc++/default.nix | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.7/libc++/r242056.patch | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/3.7/libc++/default.nix b/pkgs/development/compilers/llvm/3.7/libc++/default.nix index 62402142a129..1196645b923e 100644 --- a/pkgs/development/compilers/llvm/3.7/libc++/default.nix +++ b/pkgs/development/compilers/llvm/3.7/libc++/default.nix @@ -14,7 +14,10 @@ stdenv.mkDerivation rec { cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include") ''; - patches = [ ./darwin.patch ]; + patches = [ + ./darwin.patch + ./r242056.patch + ]; buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/3.7/libc++/r242056.patch b/pkgs/development/compilers/llvm/3.7/libc++/r242056.patch new file mode 100644 index 000000000000..96245e76653a --- /dev/null +++ b/pkgs/development/compilers/llvm/3.7/libc++/r242056.patch @@ -0,0 +1,16 @@ +--- a/include/string 2015/07/13 20:04:56 242056 ++++ b/include/string 2015/07/18 20:40:46 242623 +@@ -1936,7 +1936,12 @@ + template <class _CharT, class _Traits, class _Allocator> + inline _LIBCPP_INLINE_VISIBILITY + basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) +- : __r_(__a) ++#if _LIBCPP_STD_VER <= 14 ++ _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value) ++#else ++ _NOEXCEPT ++#endif ++: __r_(__a) + { + #if _LIBCPP_DEBUG_LEVEL >= 2 + __get_db()->__insert_c(this); |