Merge pull request #21541 from veprbl/libcpp37

libc++3.7: fix to use with clang 3.9
This commit is contained in:
Daiderd Jordan 2017-01-02 00:39:30 +01:00 committed by GitHub
commit 2bb33130cc
4 changed files with 24 additions and 9 deletions

View file

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
name = "root-${version}";
version = "6.04.18";
version = "6.08.02";
src = fetchurl {
url = "https://root.cern.ch/download/root_v${version}.source.tar.gz";
sha256 = "00f3v3l8nimfkcxpn9qpyh3h23na0mi4wkds2y5gwqh8wh3jryq9";
sha256 = "0530v1r4rvds52hgb13f00l3phhn76z6vii550mwv8bj3sl5070k";
};
buildInputs = [ cmake pcre pkgconfig python2 zlib lzma gsl ]
@ -16,10 +16,6 @@ stdenv.mkDerivation rec {
;
patches = [
(fetchpatch {
url = "https://github.com/root-mirror/root/commit/ee9964210c56e7c1868618a4434c5340fef38fe4.patch";
sha256 = "186i7ni75yvjydy6lpmaplqxfb5z2019bgpbhff1n6zn2qlrff2r";
})
./sw_vers.patch
# this prevents thisroot.sh from setting $p, which interferes with stdenv setup

View file

@ -42,12 +42,12 @@ diff --git a/cmake/modules/SetUpMacOS.cmake b/cmake/modules/SetUpMacOS.cmake
@@ -38,27 +24,6 @@ if (CMAKE_SYSTEM_NAME MATCHES Darwin)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64")
SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m64")
SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m64")
- else(${SYSCTL_OUTPUT} MATCHES 64)
- MESSAGE(STATUS "Found a 32bit system")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
- SET(CMAKE_FORTRAN_FLAGS "${CMAKE_FORTRAN_FLAGS} -m32")
- SET(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -m32")
- endif(${SYSCTL_OUTPUT} MATCHES 64)
- endif()
-

View file

@ -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;

View file

@ -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);