llvmPackages_9: hashes, pname-ification

This commit is contained in:
Will Dietz 2019-09-19 13:24:37 -05:00
parent 9552213d07
commit 99eeff0f69
No known key found for this signature in database
GPG Key ID: EBB0EA4124809D02
11 changed files with 57 additions and 37 deletions

View File

@ -6,9 +6,10 @@
let
self = stdenv.mkDerivation ({
name = "clang-${version}";
pname = "clang";
inherit version;
src = fetch "cfe" "0ihnbdl058gvl2wdy45p5am55bq8ifx8m9mhcsgj9ax8yxlzvvvh";
src = fetch "cfe" "0426ma80i41qsgzm1qdz81mjskck426diygxi2k5vji2gkpixa3v";
unpackPhase = ''
unpackFile $src
@ -105,7 +106,7 @@ let
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "clang-manpages-${version}";
pname = "clang-manpages";
buildPhase = ''
make docs-clang-man

View File

@ -1,8 +1,8 @@
{ stdenv, version, fetch, cmake, python, llvm, libcxxabi }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi";
src = fetch pname "03ni43lbkp63lr3p6sc94dphqmvnz5av5mml0xmk930xvnbcvr2n";
nativeBuildInputs = [ cmake python llvm ];
buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;

View File

@ -5,7 +5,7 @@
}:
let
release_version = "8.0.1";
release_version = "9.0.0";
version = release_version; # differentiating these is important for rc's
fetch = name: sha256: fetchurl {
@ -13,7 +13,7 @@ let
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
clang-tools-extra_src = fetch "clang-tools-extra" "045cldmcfd8s33wyjlviifgpnw52yqicd6v4ysvdg4i96p78c77a";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python isl release_version version fetch; });

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "0y4vc9z36c1zlq15cnibdzxnc1xi5glbc6klnm8a41q3db4541kz";
src = fetch "libcxx" "136j3v7il9aq8wyp48klx6sifnl5asj4lf5c8yx08cjx5fbn4h9w";
postUnpack = ''
unpackFile ${libcxxabi.src}
@ -14,10 +14,6 @@ stdenv.mkDerivation {
patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
prePatch = ''
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
'';
preConfigure = ''
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")

View File

@ -5,7 +5,7 @@ stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "1vznz8n1z1h8af0ga451m98lc2hjnv4fyzl71napsvjhvk4g6nxp";
src = fetch "libcxxabi" "1s9haplqv8ashlsdx2psxiqxh50gqk2jp2vz5yn0djb56mw42l37";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;

View File

@ -1,24 +1,13 @@
{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch "libunwind" "0vhgcgzsb33l83qaikrkj87ypqb48mi607rccczccwiiv8ficw0q";
src = fetch pname "1chd1nz4bscrs6qa7p8sqgk5df86ll0frv0f451vhks2w44qsslp";
nativeBuildInputs = [ cmake ];
patches = [
(fetchpatch {
url = "https://github.com/llvm-mirror/libunwind/commit/34a45c630d4c79af403661d267db42fbe7de1178.patch";
sha256 = "0n0pv6jvcky8pn3srhrf9x5kbnd0d2kia9xlx2g590f5q0bgwfhv";
})
(fetchpatch {
url = "https://github.com/llvm-mirror/libunwind/commit/e050272d2eb57eb4e56a37b429a61df2ebb8aa3e.patch";
sha256 = "1sxyx5xnax8k713jjcxgq3jq3cpnxygs2rcdf5vfja0f2k9jzldl";
})
];
enableParallelBuilding = true;
cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";

View File

@ -6,11 +6,11 @@
, version
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "lld";
inherit version;
src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
src = fetch pname "14cgd34gr826qpxzhrkbz6qgm8ymds0hrsiznwzp42ax4f5p9iii";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];

View File

@ -0,0 +1,31 @@
--- a/source/Plugins/Process/Linux/Procfs.h
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -11,21 +11,12 @@
// sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
-#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t;
-typedef elf_greg_t
- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
-typedef struct user_fpsimd_state elf_fpregset_t;
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#elif defined(__mips__)
-#ifndef NT_FPREGSET
-#define NT_FPREGSET NT_PRFPREG
-#endif // NT_FPREGSET
-#endif
-#else // __ANDROID__
+#if !defined(__GLIBC__) && defined(__powerpc__)
+#define pt_regs musl_pt_regs
+#include <sys/procfs.h>
+#undef pt_regs
+#else
#include <sys/procfs.h>
-#endif // __ANDROID__
+#endif

View File

@ -14,11 +14,11 @@
, darwin
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "lldb";
inherit version;
src = fetch "lldb" "1mriw4adrwm6kzabrjr7yqmdiylxd6glf6samd80dp8idnm9p9z8";
src = fetch pname "1507dl0xw03nppxpz2xsq4s30jdbkplx4w14za54ngqm3xm2yk0y";
postPatch = ''
# Fix up various paths that assume llvm and clang are installed in the same place
@ -30,6 +30,8 @@ stdenv.mkDerivation {
cmake/modules/LLDBStandalone.cmake
'';
patches = [ ./lldb-procfs.patch ];
nativeBuildInputs = [ cmake python which swig ];
buildInputs = [ ncurses zlib libedit libxml2 llvm ]
++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];

View File

@ -27,11 +27,12 @@ let
shortVersion = with stdenv.lib;
concatStringsSep "." (take 1 (splitString "." release_version));
in stdenv.mkDerivation ({
name = "llvm-${version}";
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
src = fetch "llvm" "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24";
polly_src = fetch "polly" "1lfjdz3ilj5xmjxvicd8f5ykybks67ry2pdb777352r3mzlgg8g8";
src = fetch pname "117ymdz1by2nkfq1c2p9m4050dp848kbjbiv6nsfj8hzy9f5d86n";
polly_src = fetch "polly" "0cyl2gsibf1dhqvkyw1qb0f8q58ib6cihzyh4f9kj9g77ll95ym4";
unpackPhase = ''
unpackFile $src
@ -150,7 +151,7 @@ in stdenv.mkDerivation ({
platforms = stdenv.lib.platforms.all;
};
} // stdenv.lib.optionalAttrs enableManpages {
name = "llvm-manpages-${version}";
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man

View File

@ -6,11 +6,11 @@
, version
}:
stdenv.mkDerivation {
stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
src = fetch pname "0nrv9np134b7c483jnq786spy3hbpj11d7g21g67cqq66c8ynycr";
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];