Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] llvm 9 update #85151

Closed
wants to merge 15 commits into from
5 changes: 5 additions & 0 deletions pkgs/development/libraries/mpfr/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ stdenv.mkDerivation rec {
# mpfr.h requires gmp.h
propagatedBuildInputs = [ gmp ];

# Bug reported by upstream https://bugs.llvm.org/show_bug.cgi?id=43557
prePatch = stdenv.lib.optionalString stdenv.cc.isClang ''
rm tests/tcmp_ui.c
'';

configureFlags =
stdenv.lib.optional stdenv.hostPlatform.isSunOS "--disable-thread-safe" ++
stdenv.lib.optional stdenv.hostPlatform.is64bit "--with-pic";
Expand Down
42 changes: 21 additions & 21 deletions pkgs/stdenv/darwin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
, bootstrapFiles ? let
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/d5bdfcbfe6346761a332918a267e82799ec954d2/${file}";
url = "https://hydra.nixos.org/build/114670681/download/${file}";
inherit (localSystem) system;
inherit sha256 executable;
}; in {
sh = fetch { file = "sh"; sha256 = "07wm33f1yzfpcd3rh42f8g096k4cvv7g65p968j28agzmm2s7s8m"; };
bzip2 = fetch { file = "bzip2"; sha256 = "0y9ri2aprkrp2dkzm6229l0mw4rxr2jy7vvh3d8mxv2698v2kdbm"; };
mkdir = fetch { file = "mkdir"; sha256 = "0sb07xpy66ws6f2jfnpjibyimzb71al8n8c6y4nr8h50al3g90nr"; };
cpio = fetch { file = "cpio"; sha256 = "0r5c54hg678w7zydx27bzl9p3v9fs25y5ix6vdfi1ilqim7xh65n"; };
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "18hp5w6klr8g307ap4368r255qpzg9r0vwg9vqvj8f2zy1xilcjf"; executable = false; };
sh = fetch { file = "2/sh"; sha256 = "0arhdhk58bb3j73hk7wlxapwzg1hj0i47ar5nvnqx0ip95fgidlx"; };
bzip2 = fetch { file = "5/bzip2"; sha256 = "1rshmich28fzd9hvzdwrkm7cahay99jzid3xgv91aambjpwc1ff9"; };
mkdir = fetch { file = "4/mkdir"; sha256 = "0yfqykdghwqdmc1pv5xrymwf0jxvzp116zs6xdzqsqywcz3cqswy"; };
cpio = fetch { file = "3/cpio"; sha256 = "09hmbw617d06v6cd1fxybdz3cx0fkc0ps4mk02bam090qhac919q"; };
tarball = fetch { file = "1/bootstrap-tools.cpio.bz2"; sha256 = "0icqkbg2q3xz7rhh0j9as8mqdbqnllpffffyay9hgh4vhx3dcx0r"; executable = false; };
}
}:

Expand Down Expand Up @@ -159,7 +159,7 @@ in rec {
dyld = bootstrapTools;
};

llvmPackages_7 = {
llvmPackages_9 = {
libcxx = stdenv.mkDerivation {
name = "bootstrap-stage0-libcxx";
phases = [ "installPhase" "fixupPhase" ];
Expand Down Expand Up @@ -263,9 +263,9 @@ in rec {
# Avoid pulling in a full python and its extra dependencies for the llvm/clang builds.
libxml2 = super.libxml2.override { pythonSupport = false; };

llvmPackages_7 = super.llvmPackages_7 // (let
libraries = super.llvmPackages_7.libraries.extend (_: _: {
inherit (llvmPackages_7) libcxx libcxxabi;
llvmPackages_9 = super.llvmPackages_9 // (let
libraries = super.llvmPackages_9.libraries.extend (_: _: {
inherit (llvmPackages_9) libcxx libcxxabi;
});
in { inherit libraries; } // libraries);

Expand Down Expand Up @@ -317,13 +317,13 @@ in rec {
];
});

llvmPackages_7 = super.llvmPackages_7 // (let
tools = super.llvmPackages_7.tools.extend (llvmSelf: _: {
clang-unwrapped = llvmPackages_7.clang-unwrapped.override { llvm = llvmSelf.llvm; };
llvm = llvmPackages_7.llvm.override { inherit libxml2; };
llvmPackages_9 = super.llvmPackages_9 // (let
tools = super.llvmPackages_9.tools.extend (llvmSelf: _: {
clang-unwrapped = llvmPackages_9.clang-unwrapped.override { llvm = llvmSelf.llvm; };
llvm = llvmPackages_9.llvm.override { inherit libxml2; };
});
libraries = super.llvmPackages_7.libraries.extend (llvmSelf: _: {
inherit (llvmPackages_7) libcxx libcxxabi compiler-rt;
libraries = super.llvmPackages_9.libraries.extend (llvmSelf: _: {
inherit (llvmPackages_9) libcxx libcxxabi compiler-rt;
});
in { inherit tools libraries; } // tools // libraries);

Expand Down Expand Up @@ -357,12 +357,12 @@ in rec {
ncurses libffi zlib llvm gmp pcre gnugrep
coreutils findutils diffutils patchutils;

llvmPackages_7 = super.llvmPackages_7 // (let
tools = super.llvmPackages_7.tools.extend (_: super: {
inherit (llvmPackages_7) llvm clang-unwrapped;
llvmPackages_9 = super.llvmPackages_9 // (let
tools = super.llvmPackages_9.tools.extend (_: super: {
inherit (llvmPackages_9) llvm clang-unwrapped;
});
libraries = super.llvmPackages_7.libraries.extend (_: _: {
inherit (llvmPackages_7) compiler-rt libcxx libcxxabi;
libraries = super.llvmPackages_9.libraries.extend (_: _: {
inherit (llvmPackages_9) compiler-rt libcxx libcxxabi;
});
in { inherit tools libraries; } // tools // libraries);

Expand Down
3 changes: 2 additions & 1 deletion pkgs/stdenv/darwin/make-bootstrap-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
with import pkgspath { inherit system; };

let
llvmPackages = llvmPackages_7;
llvmPackages = llvmPackages_9;
in rec {
coreutils_ = coreutils.override (args: {
# We want coreutils without ACL support.
Expand Down Expand Up @@ -82,6 +82,7 @@ in rec {

cp -rL ${llvmPackages.clang-unwrapped}/lib/clang $out/lib

cp -d ${llvmPackages.libclang}/lib/libclang-cpp.dylib $out/lib
cp -d ${llvmPackages.libcxx}/lib/libc++*.dylib $out/lib
cp -d ${llvmPackages.libcxxabi}/lib/libc++abi*.dylib $out/lib
cp -d ${llvmPackages.llvm.lib}/lib/libLLVM.dylib $out/lib
Expand Down
6 changes: 3 additions & 3 deletions pkgs/tools/text/groff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ stdenv.mkDerivation rec {

enableParallelBuilding = false;

patches = [
./0001-Fix-cross-compilation-by-looking-for-ar.patch
];
patches = [ ./0001-Fix-cross-compilation-by-looking-for-ar.patch ]
# Based on https://svnweb.freebsd.org/ports?view=revision&revision=512436
++ stdenv.lib.optional stdenv.cc.isClang ./libcxx-9.patch;

postPatch = stdenv.lib.optionalString (psutils != null) ''
substituteInPlace src/preproc/html/pre-html.cpp \
Expand Down
13 changes: 13 additions & 0 deletions pkgs/tools/text/groff/libcxx-9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/math.in.h b/lib/math.in.h
index c30fc20..6b3715c 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -34,7 +34,7 @@
#endif

#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
+# include <config.h>
#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_MATH_INLINE
33 changes: 16 additions & 17 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4135,9 +4135,7 @@ in
hdf4 = null;
};

haproxy = callPackage ../tools/networking/haproxy {
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
};
haproxy = callPackage ../tools/networking/haproxy { };

hackertyper = callPackage ../tools/misc/hackertyper { };

Expand Down Expand Up @@ -4345,8 +4343,8 @@ in
idevicerestore = callPackage ../tools/misc/idevicerestore { };

inherit (callPackages ../tools/filesystems/irods rec {
stdenv = llvmPackages.libcxxStdenv;
libcxx = llvmPackages.libcxx;
stdenv = llvmPackages_7.libcxxStdenv;
libcxx = llvmPackages_7.libcxx;
boost = boost160.override { inherit stdenv; };
avro-cpp_llvm = avro-cpp.override { inherit stdenv boost; };
})
Expand Down Expand Up @@ -5358,7 +5356,9 @@ in
docbook-xsl = docbook_xsl;
};

mosh = callPackage ../tools/networking/mosh { };
mosh = callPackage ../tools/networking/mosh {
stdenv = if stdenv.cc.isClang then llvmPackages_7.stdenv else stdenv;
};

mpage = callPackage ../tools/text/mpage { };

Expand Down Expand Up @@ -9072,7 +9072,7 @@ in
llvm_6 = llvmPackages_6.llvm;
llvm_5 = llvmPackages_5.llvm;

llvmPackages = recurseIntoAttrs llvmPackages_7;
llvmPackages = recurseIntoAttrs llvmPackages_9;

llvmPackages_5 = callPackage ../development/compilers/llvm/5 ({
inherit (stdenvAdapters) overrideCC;
Expand Down Expand Up @@ -10418,10 +10418,7 @@ in

cpplint = callPackage ../development/tools/analysis/cpplint { };

ccls = callPackage ../development/tools/misc/ccls {
llvmPackages = llvmPackages_8;
stdenv = llvmPackages_8.stdenv;
};
ccls = callPackage ../development/tools/misc/ccls { };

credstash = with python3Packages; toPythonApplication credstash;

Expand Down Expand Up @@ -11623,9 +11620,7 @@ in

cln = callPackage ../development/libraries/cln { };

clucene_core_2 = callPackage ../development/libraries/clucene-core/2.x.nix {
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
};
clucene_core_2 = callPackage ../development/libraries/clucene-core/2.x.nix { };

clucene_core_1 = callPackage ../development/libraries/clucene-core {
stdenv = if stdenv.cc.isClang then llvmPackages_6.stdenv else stdenv;
Expand Down Expand Up @@ -12661,7 +12656,9 @@ in

jbigkit = callPackage ../development/libraries/jbigkit { };

jemalloc = callPackage ../development/libraries/jemalloc { };
jemalloc = callPackage ../development/libraries/jemalloc {
stdenv = if stdenv.cc.isClang then llvmPackages_8.stdenv else stdenv;
};

jemalloc450 = callPackage ../development/libraries/jemalloc/jemalloc450.nix { };

Expand Down Expand Up @@ -13954,7 +13951,6 @@ in
libGLU = mesa_glu;

mesa = callPackage ../development/libraries/mesa {
llvmPackages = llvmPackages_9;
inherit (darwin.apple_sdk.frameworks) OpenGL;
inherit (darwin.apple_sdk.libs) Xplugin;
}
Expand Down Expand Up @@ -16224,6 +16220,7 @@ in
};

mariadb = callPackage ../servers/sql/mariadb {
stdenv = if stdenv.cc.isClang then llvmPackages_7.stdenv else stdenv;
# As per mariadb's cmake, "static jemalloc_pic.a can only be used up to jemalloc 4".
# https://jira.mariadb.org/browse/MDEV-15034
jemalloc450 = jemalloc450.override ({ disableInitExecTls = true; });
Expand Down Expand Up @@ -18138,7 +18135,9 @@ in

comic-relief = callPackage ../data/fonts/comic-relief {};

coreclr = callPackage ../development/compilers/coreclr { };
coreclr = callPackage ../development/compilers/coreclr {
llvmPackages = llvmPackages_7;
};

corefonts = callPackage ../data/fonts/corefonts { };

Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/darwin-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in
binutils-unwrapped = callPackage ../os-specific/darwin/binutils {
inherit (darwin) cctools;
inherit (pkgs) binutils-unwrapped;
inherit (pkgs.llvmPackages_7) llvm;
inherit (pkgs.llvmPackages_9) llvm;
};

binutils = pkgs.wrapBintoolsWith {
Expand Down
1 change: 1 addition & 0 deletions pkgs/top-level/perl-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10669,6 +10669,7 @@ let
pname = "gettext";
version = "1.07";
buildInputs = [ pkgs.gettext ];
doCheck = !stdenv.isDarwin;
src = fetchurl {
url = "mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.07.tar.gz";
sha256 = "05cwqjxxary11di03gg3fm6j9lbvg1dr2wpr311c1rwp8salg7ch";
Expand Down