git.iko.soy/typeable/nixpkgs
on master help sign in
llvm_{39,4}: refactor to use same patch file
commit182de524a1339cf00b186fe277a5aeefc3ac982c authorWill Dietz <w@wdtz.org> dateSat 23 Jun 2018, 11:45 (8 years ago) parenta1bf9b6
4 files changed+2−35
pkgs/development/compilers/llvm/3.9/llvm.nix+1−1 pkgs/development/compilers/llvm/4/dynamiclibrary-musl.patch−33 pkgs/development/compilers/llvm/4/llvm.nix+1−1 pkgs/development/compilers/llvm/3.9/dynamiclibrary-musl.patch → pkgs/development/compilers/llvm/dynamiclibrary-musl.patch
pkgs/development/compilers/llvm/3.9/llvm.nix+1−1
@@ -64,7 +64,7 @@ in stdenv.mkDerivation rec {
6464 })
6565 ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
6666 ../TLI-musl.patch
67− ./dynamiclibrary-musl.patch
67+ ../dynamiclibrary-musl.patch
6868 ];
6969
7070 postPatch = ""
pkgs/development/compilers/llvm/4/dynamiclibrary-musl.patchdeleted−33
@@ -1,33 +0,0 @@
1−From d12ecb83d01dcb580dd94f4d57828f33d3eb4c35 Mon Sep 17 00:00:00 2001
2−From: Natanael Copa <ncopa@alpinelinux.org>
3−Date: Thu, 18 Feb 2016 15:33:21 +0100
4−Subject: [PATCH 3/3] Fix DynamicLibrary to build with musl libc
5−
6−stdin/out/err is part of the libc and not the kernel so we check for the
7−specific libc that does the unexpected instead of linux.
8−
9−This is needed for making it build with musl libc.
10−---
11− lib/Support/DynamicLibrary.cpp | 4 ++--
12− 1 file changed, 2 insertions(+), 2 deletions(-)
13−
14−diff --git a/lib/Support/DynamicLibrary.cpp b/lib/Support/DynamicLibrary.cpp
15−index 9a7aeb5..0c1c8f8 100644
16−--- a/lib/Support/DynamicLibrary.cpp
17−+++ b/lib/Support/DynamicLibrary.cpp
18−@@ -140,10 +140,10 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
19− #define EXPLICIT_SYMBOL(SYM) \
20− if (!strcmp(symbolName, #SYM)) return &SYM
21−
22−-// On linux we have a weird situation. The stderr/out/in symbols are both
23−+// On GNU libc we have a weird situation. The stderr/out/in symbols are both
24− // macros and global variables because of standards requirements. So, we
25− // boldly use the EXPLICIT_SYMBOL macro without checking for a #define first.
26−-#if defined(__linux__) and !defined(__ANDROID__)
27−+#if defined(__GLIBC__)
28− {
29− EXPLICIT_SYMBOL(stderr);
30− EXPLICIT_SYMBOL(stdout);
31−--
32−2.7.3
33−
pkgs/development/compilers/llvm/4/llvm.nix+1−1
@@ -83,7 +83,7 @@ in stdenv.mkDerivation (rec {
8383 patch -p0 < ${../aarch64.patch}
8484 '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
8585 patch -p1 -i ${../TLI-musl.patch}
86− patch -p1 -i ${./dynamiclibrary-musl.patch}
86+ patch -p1 -i ${../dynamiclibrary-musl.patch}
8787 patch -p1 -i ${./sanitizers-nongnu.patch} -d projects/compiler-rt
8888 '';
8989
pkgs/development/compilers/llvm/3.9/dynamiclibrary-musl.patch → pkgs/development/compilers/llvm/dynamiclibrary-musl.patchrenamed

The content is the same.