Merge pull request #21541 from veprbl/libcpp37

libc++3.7: fix to use with clang 3.9

authored by Daiderd Jordan and committed by GitHub 2bb33130 c2752f82

+24 -9
+2 -6
pkgs/applications/science/misc/root/default.nix
··· 3 3 4 4 stdenv.mkDerivation rec { 5 5 name = "root-${version}"; 6 - version = "6.04.18"; 6 + version = "6.08.02"; 7 7 8 8 src = fetchurl { 9 9 url = "https://root.cern.ch/download/root_v${version}.source.tar.gz"; 10 - sha256 = "00f3v3l8nimfkcxpn9qpyh3h23na0mi4wkds2y5gwqh8wh3jryq9"; 10 + sha256 = "0530v1r4rvds52hgb13f00l3phhn76z6vii550mwv8bj3sl5070k"; 11 11 }; 12 12 13 13 buildInputs = [ cmake pcre pkgconfig python2 zlib lzma gsl ] ··· 16 16 ; 17 17 18 18 patches = [ 19 - (fetchpatch { 20 - url = "https://github.com/root-mirror/root/commit/ee9964210c56e7c1868618a4434c5340fef38fe4.patch"; 21 - sha256 = "186i7ni75yvjydy6lpmaplqxfb5z2019bgpbhff1n6zn2qlrff2r"; 22 - }) 23 19 ./sw_vers.patch 24 20 25 21 # this prevents thisroot.sh from setting $p, which interferes with stdenv setup
+2 -2
pkgs/applications/science/misc/root/sw_vers.patch
··· 42 42 @@ -38,27 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin) 43 43 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") 44 44 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") 45 - SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m64") 45 + SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64") 46 46 - else(${SYSCTL_OUTPUT} MATCHES 64) 47 47 - MESSAGE(STATUS "Found a 32bit system") 48 48 - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") 49 49 - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") 50 - - SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m32") 50 + - SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32") 51 51 - endif(${SYSCTL_OUTPUT} MATCHES 64) 52 52 - endif() 53 53 -
+4 -1
pkgs/development/compilers/llvm/3.7/libc++/default.nix
··· 14 14 cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include") 15 15 ''; 16 16 17 - patches = [ ./darwin.patch ]; 17 + patches = [ 18 + ./darwin.patch 19 + ./r242056.patch 20 + ]; 18 21 19 22 buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 20 23
+16
pkgs/development/compilers/llvm/3.7/libc++/r242056.patch
··· 1 + --- a/include/string 2015/07/13 20:04:56 242056 2 + +++ b/include/string 2015/07/18 20:40:46 242623 3 + @@ -1936,7 +1936,12 @@ 4 + template <class _CharT, class _Traits, class _Allocator> 5 + inline _LIBCPP_INLINE_VISIBILITY 6 + basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) 7 + - : __r_(__a) 8 + +#if _LIBCPP_STD_VER <= 14 9 + + _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value) 10 + +#else 11 + + _NOEXCEPT 12 + +#endif 13 + +: __r_(__a) 14 + { 15 + #if _LIBCPP_DEBUG_LEVEL >= 2 16 + __get_db()->__insert_c(this);