diff options
author | aszlig <aszlig@nix.build> | 2017-11-08 22:01:20 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2017-11-08 22:08:11 +0100 |
commit | 44cb95a23460707cb100720c23aae6e497177268 (patch) | |
tree | a8d1230ebe199be30ec050bcad3cf8ae3f82510b /pkgs/development/compilers/llvm/3.5 | |
parent | 03e8bed8b33c3078e78b57abb0bad5b1bd9aea28 (diff) | |
download | nixlib-44cb95a23460707cb100720c23aae6e497177268.tar nixlib-44cb95a23460707cb100720c23aae6e497177268.tar.gz nixlib-44cb95a23460707cb100720c23aae6e497177268.tar.bz2 nixlib-44cb95a23460707cb100720c23aae6e497177268.tar.lz nixlib-44cb95a23460707cb100720c23aae6e497177268.tar.xz nixlib-44cb95a23460707cb100720c23aae6e497177268.tar.zst nixlib-44cb95a23460707cb100720c23aae6e497177268.zip |
llvmPackages/libc++: Fix build against glibc 2.26
This is very similar to what we had in bb0b0822ef39d987952a04ae61fb8071. The xlocale.h header is no longer existing in glibc version 2.26, so we need to avoid including it. I've tested building against all of the libcxx attributes of LLVM 3.5, 3.7, 3.8, 3.9, 4 and 5. All of them succeeded except version 3.5, which failed because of an unrelated issue (build of libc++abi has failed, one of its dependencies), so I only verified whether the patch applies cleanly. Signed-off-by: aszlig <aszlig@nix.build> Cc: @vcunat
Diffstat (limited to 'pkgs/development/compilers/llvm/3.5')
-rw-r--r-- | pkgs/development/compilers/llvm/3.5/libc++/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.5/libc++/xlocale-glibc-2.26.patch | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/pkgs/development/compilers/llvm/3.5/libc++/default.nix b/pkgs/development/compilers/llvm/3.5/libc++/default.nix index abc198b06864..1f1129f578f4 100644 --- a/pkgs/development/compilers/llvm/3.5/libc++/default.nix +++ b/pkgs/development/compilers/llvm/3.5/libc++/default.nix @@ -20,7 +20,11 @@ stdenv.mkDerivation rec { '"${libcxxabi}/lib/libc++abi.dylib"' ''; - patches = [ ./darwin.patch ]; + patches = [ + ./darwin.patch + # glibc 2.26 fix + ./xlocale-glibc-2.26.patch + ]; buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; diff --git a/pkgs/development/compilers/llvm/3.5/libc++/xlocale-glibc-2.26.patch b/pkgs/development/compilers/llvm/3.5/libc++/xlocale-glibc-2.26.patch new file mode 100644 index 000000000000..250bb49fc231 --- /dev/null +++ b/pkgs/development/compilers/llvm/3.5/libc++/xlocale-glibc-2.26.patch @@ -0,0 +1,17 @@ +diff --git a/include/__locale b/include/__locale +index 3daa1f1..cb8e151 100644 +--- a/include/__locale ++++ b/include/__locale +@@ -29,10 +29,10 @@ + # if __ANDROID_API__ <= 20 + # include <support/android/locale_bionic.h> + # endif +-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ ++#elif (defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__sun__) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) + # include <xlocale.h> +-#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ ++#endif // __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ + + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) + #pragma GCC system_header |