diff options
author | Peter Simons <simons@cryp.to> | 2020-08-12 17:56:26 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2020-08-12 17:56:26 +0200 |
commit | a6a8a6f691324998e7e35c16ae518cd33300743a (patch) | |
tree | f35cb8c44fbc87af8068f35c854d80225abbfa38 /pkgs/development/compilers | |
parent | c1936a8df92d9ea05a1eaab9fb1c03713ad6839a (diff) | |
parent | 2c0034d5fbcb1b6b511a2369329a2446c84bf884 (diff) |
Merge remote-tracking branch 'origin/master' into haskell-updates.
Diffstat (limited to 'pkgs/development/compilers')
17 files changed, 53 insertions, 60 deletions
diff --git a/pkgs/development/compilers/computecpp/default.nix b/pkgs/development/compilers/computecpp/default.nix index 68d11bdf8b194..31a0b054ee729 100644 --- a/pkgs/development/compilers/computecpp/default.nix +++ b/pkgs/development/compilers/computecpp/default.nix @@ -37,8 +37,6 @@ stdenv.mkDerivation rec { passthru = { isClang = true; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix b/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix index b74c5c7e9e458..f8f06e24f8ba7 100644 --- a/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix +++ b/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix @@ -1,9 +1,7 @@ -{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, ... }: +{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, gccForLibs, ... }: let rev = emscriptenVersion; - haveGcc = stdenv.cc.isGNU || stdenv.cc.cc ? gcc; - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; in stdenv.mkDerivation rec { name = "emscripten-fastcomp-${rev}"; @@ -35,16 +33,14 @@ stdenv.mkDerivation rec { #"-DLLVM_CONFIG=${llvm}/bin/llvm-config" "-DLLVM_BUILD_TESTS=ON" "-DCLANG_INCLUDE_TESTS=ON" - ] ++ (stdenv.lib.optional (stdenv.isLinux && haveGcc) + ] ++ (stdenv.lib.optional stdenv.isLinux # necessary for clang to find crtend.o - "-DGCC_INSTALL_PREFIX=${gcc}" + "-DGCC_INSTALL_PREFIX=${gccForLibs}" ); enableParallelBuilding = true; passthru = { isClang = true; - } // stdenv.lib.optionalAttrs haveGcc { - inherit gcc; }; meta = with stdenv.lib; { diff --git a/pkgs/development/compilers/llvm/10/clang/default.nix b/pkgs/development/compilers/llvm/10/clang/default.nix index 1788ac2d96f0c..a3d6e7e402ab6 100644 --- a/pkgs/development/compilers/llvm/10/clang/default.nix +++ b/pkgs/development/compilers/llvm/10/clang/default.nix @@ -87,8 +87,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/10/default.nix b/pkgs/development/compilers/llvm/10/default.nix index cd77eed9ac804..37ab89a5a315e 100644 --- a/pkgs/development/compilers/llvm/10/default.nix +++ b/pkgs/development/compilers/llvm/10/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -59,7 +60,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/5/clang/default.nix b/pkgs/development/compilers/llvm/5/clang/default.nix index a2641e7ea49ca..cd7d952243ce6 100644 --- a/pkgs/development/compilers/llvm/5/clang/default.nix +++ b/pkgs/development/compilers/llvm/5/clang/default.nix @@ -4,7 +4,6 @@ }: let - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; self = stdenv.mkDerivation ({ pname = "clang"; inherit version; @@ -78,8 +77,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs stdenv.isLinux { - inherit gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/5/default.nix b/pkgs/development/compilers/llvm/5/default.nix index 5a992f4a3504f..36495249d16f2 100644 --- a/pkgs/development/compilers/llvm/5/default.nix +++ b/pkgs/development/compilers/llvm/5/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -51,7 +52,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/6/clang/default.nix b/pkgs/development/compilers/llvm/6/clang/default.nix index 27d2106a3a09c..8f6479fe2f4e6 100644 --- a/pkgs/development/compilers/llvm/6/clang/default.nix +++ b/pkgs/development/compilers/llvm/6/clang/default.nix @@ -4,7 +4,6 @@ }: let - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; self = stdenv.mkDerivation ({ pname = "clang"; inherit version; @@ -78,8 +77,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs stdenv.targetPlatform.isLinux { - inherit gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/6/default.nix b/pkgs/development/compilers/llvm/6/default.nix index 2316fbfc3fb26..4c2e87ec5e1af 100644 --- a/pkgs/development/compilers/llvm/6/default.nix +++ b/pkgs/development/compilers/llvm/6/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -51,7 +52,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/7/clang/default.nix b/pkgs/development/compilers/llvm/7/clang/default.nix index a1b83aa099e42..905ec862ad7ec 100644 --- a/pkgs/development/compilers/llvm/7/clang/default.nix +++ b/pkgs/development/compilers/llvm/7/clang/default.nix @@ -88,8 +88,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/7/default.nix b/pkgs/development/compilers/llvm/7/default.nix index b83c0d2ceedde..3dd067ae607ec 100644 --- a/pkgs/development/compilers/llvm/7/default.nix +++ b/pkgs/development/compilers/llvm/7/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -58,7 +59,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/8/clang/default.nix b/pkgs/development/compilers/llvm/8/clang/default.nix index 3fb43c02d8cf1..2d7fc8068900c 100644 --- a/pkgs/development/compilers/llvm/8/clang/default.nix +++ b/pkgs/development/compilers/llvm/8/clang/default.nix @@ -98,8 +98,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/8/default.nix b/pkgs/development/compilers/llvm/8/default.nix index 984e7ab74b74d..6e80737f32adb 100644 --- a/pkgs/development/compilers/llvm/8/default.nix +++ b/pkgs/development/compilers/llvm/8/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -59,7 +60,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/llvm/9/clang/default.nix b/pkgs/development/compilers/llvm/9/clang/default.nix index 9bc7a88e9123f..81117e904d82a 100644 --- a/pkgs/development/compilers/llvm/9/clang/default.nix +++ b/pkgs/development/compilers/llvm/9/clang/default.nix @@ -93,8 +93,6 @@ let passthru = { isClang = true; inherit llvm; - } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) { - gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc; }; meta = { diff --git a/pkgs/development/compilers/llvm/9/default.nix b/pkgs/development/compilers/llvm/9/default.nix index 816a4f3d2302f..6f5bdb8e8cc10 100644 --- a/pkgs/development/compilers/llvm/9/default.nix +++ b/pkgs/development/compilers/llvm/9/default.nix @@ -1,5 +1,6 @@ -{ lowPrio, newScope, pkgs, stdenv, cmake +{ lowPrio, newScope, pkgs, stdenv, cmake, gccForLibs , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith +, buildPackages , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross }: @@ -24,8 +25,8 @@ let ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc" ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib" echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags - '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) '' - echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags + '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && !(stdenv.targetPlatform.useLLVM or false)) '' + echo "--gcc-toolchain=${gccForLibs}" >> $out/nix-support/cc-cflags ''; in { @@ -59,7 +60,8 @@ let libstdcxxClang = wrapCCWith rec { cc = tools.clang-unwrapped; - libcxx = null; # libstdcxx is smuggled in with clang.gcc + # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper. + libcxx = null; extraPackages = [ targetLlvmLibraries.compiler-rt ]; diff --git a/pkgs/development/compilers/swift/default.nix b/pkgs/development/compilers/swift/default.nix index 3340d99b6f161..c4144532c5832 100644 --- a/pkgs/development/compilers/swift/default.nix +++ b/pkgs/development/compilers/swift/default.nix @@ -2,6 +2,7 @@ , cmake , coreutils , glibc +, gccForLibs , which , perl , libedit @@ -121,7 +122,7 @@ let cmakeFlags = [ "-DGLIBC_INCLUDE_PATH=${stdenv.cc.libc.dev}/include" "-DC_INCLUDE_DIRS=${stdenv.lib.makeSearchPathOutput "dev" "include" devInputs}:${libxml2.dev}/include/libxml2" - "-DGCC_INSTALL_PREFIX=${clang.cc.gcc}" + "-DGCC_INSTALL_PREFIX=${gccForLibs}" ]; in @@ -199,7 +200,7 @@ stdenv.mkDerivation { substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \ --replace '/usr/include' "${stdenv.cc.libc.dev}/include" substituteInPlace swift/utils/build-script-impl \ - --replace '/usr/include/c++' "${clang.cc.gcc}/include/c++" + --replace '/usr/include/c++' "${gccForLibs}/include/c++" patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch} patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch} patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch} @@ -264,7 +265,7 @@ stdenv.mkDerivation { export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE" # During the Swift build, a full local LLVM build is performed and the resulting clang is invoked. # This compiler is not using the Nix wrappers, so it needs some help to find things. - export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE" + export NIX_LDFLAGS_BEFORE="-rpath ${gccForLibs.lib}/lib -L${gccForLibs.lib}/lib $NIX_LDFLAGS_BEFORE" # However, we want to use the wrapped compiler whenever possible. export CC="${clang}/bin/clang" diff --git a/pkgs/development/compilers/zulu/8.nix b/pkgs/development/compilers/zulu/8.nix index e48fee0a6a59e..cb8eb0b8f2680 100644 --- a/pkgs/development/compilers/zulu/8.nix +++ b/pkgs/development/compilers/zulu/8.nix @@ -4,11 +4,11 @@ , swingSupport ? true }: let - version = "8.28.0.1"; - openjdk = "8.0.163"; + version = "8.48.0.53"; + openjdk = "8.0.265"; - sha256_linux = "1z8s3a948nvv92wybnhkyr27ipibcy45k0zv5h5gp37ynd91df45"; - sha256_darwin = "0i0prjijsgg0yyycplpp9rlfl428126rqz7bb31pchrhi6jhk699"; + sha256_linux = "ed32513524b32a83b3b388831c69d1884df5675bd5069c6d1485fd1a060be209"; + sha256_darwin = "36f189bfbd0255195848835819377474ba9c1c868e3c204633c451c96e21f30a"; platform = if stdenv.isDarwin then "macosx" else "linux"; hash = if stdenv.isDarwin then sha256_darwin else sha256_linux; @@ -29,7 +29,7 @@ in stdenv.mkDerivation { pname = "zulu"; src = fetchurl { - url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}"; + url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}"; sha256 = hash; }; diff --git a/pkgs/development/compilers/zulu/default.nix b/pkgs/development/compilers/zulu/default.nix index bfaa4c777b327..d91581f5b10f7 100644 --- a/pkgs/development/compilers/zulu/default.nix +++ b/pkgs/development/compilers/zulu/default.nix @@ -4,11 +4,11 @@ , swingSupport ? true }: let - version = "10.1+11"; - openjdk = "10"; + version = "11.41.23"; + openjdk = "11.0.8"; - sha256_linux = "0g51n2zc7inal29n5ly3mrrfj15c7vl87zb6b2r1q67n4mnbrgm8"; - sha256_darwin = "1c5ib136nv6gz7ij31mg15nhzrl6zr7kp8spm17zwm1ib82bc73y"; + sha256_linux = "f8aee4ab30ca11ab3c8f401477df0e455a9d6b06f2710b2d1b1ddcf06067bc79"; + sha256_darwin = "643c6648cc4374f39e830e4fcb3d68f8667893d487c07eb7091df65937025cc3"; platform = if stdenv.isDarwin then "macosx" else "linux"; hash = if stdenv.isDarwin then sha256_darwin else sha256_linux; @@ -29,7 +29,7 @@ in stdenv.mkDerivation { pname = "zulu"; src = fetchurl { - url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}"; + url = "https://cdn.azul.com/zulu/bin/zulu${version}-ca-jdk${openjdk}-${platform}_x64.${extension}"; sha256 = hash; }; |