Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2020-02-10 12:55:47 +01:00
154 changed files with 3373 additions and 1173 deletions

View File

@@ -4,30 +4,30 @@
"jdk": {
"hotspot": {
"aarch64": {
"build": "11",
"sha256": "10e33e1862638e11a9158947b3d7b461727d8e396e378b171be1eb4dfe12f1ed",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.4_11.tar.gz",
"version": "11.0.4"
"build": "10",
"sha256": "04b77f6754aed68528f39750c5cfd6a439190206aff216aa081d62a0e1a794fa",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
},
"armv6l": {
"build": "10",
"sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "ab5b76203e54fe7a5221535f6f407efa43153de029a746f60af3cffb7cb5080b",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
},
"armv7l": {
"build": "10",
"sha256": "c6b1fda3f8807028cbfcc34a4ded2e8a5a6b6239d2bcc1f06673ea6b1530df94",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "ab5b76203e54fe7a5221535f6f407efa43153de029a746f60af3cffb7cb5080b",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
},
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "10",
"sha256": "6dd0c9c8a740e6c19149e98034fba8e368fd9aa16ab417aa636854d40db1a161",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "330d19a2eaa07ed02757d7a785a77bab49f5ee710ea03b4ee2fa220ddd0feffc",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
}
},
"openj9": {
@@ -35,27 +35,27 @@
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "6ead0515aecb24c6a8f5f3800a070b7d20a66c8f26cba5dad137824da590a532",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jdk_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
"version": "11.0.5"
"sha256": "1530172ee98edd129954fcdca1bf725f7b30c8bfc3cdc381c88de96b7d19e690",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
"version": "11.0.6"
}
}
},
"jre": {
"hotspot": {
"aarch64": {
"build": "11",
"sha256": "5f7b5c110fc0f344a549cb11784a6d76838061a2b6f654f7841f60e0cd286c6a",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.4_11.tar.gz",
"version": "11.0.4"
"build": "10",
"sha256": "7ed04ed9ed7271528e7f03490f1fd7dfbbc2d391414bd6fe4dd80ec3bad76d30",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
},
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "10",
"sha256": "2f08c469c9a8adea1b6ee3444ba2a8242a7e99d87976a077faf037a9eb7f884b",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "c5a4e69e2be0e3e5f5bb7c759960b20650967d0f571baad4a7f15b2c03bda352",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
}
},
"openj9": {
@@ -63,9 +63,9 @@
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "2b68ea68d41281238a9dbe494cec762bd97fe34cf4fb6ba44ee1ce66bcec9d38",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10_openj9-0.17.0/OpenJDK11U-jre_x64_linux_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
"version": "11.0.5"
"sha256": "056e4b5f7166f5daa44f36b06c735913bda52831d2e77fa2ac371505c66d10c1",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jre_x64_linux_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
"version": "11.0.6"
}
}
}
@@ -77,9 +77,9 @@
"vmType": "hotspot",
"x86_64": {
"build": "10",
"sha256": "0825d0d3177832320b697944cd8e7b2e7fe3893fafe8bfcf33ee3631aa5ca96b",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "b87102274d983bf6bb0aa6c2c623301d0ff5eb7f61043ffd04abb00f962c2dcd",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
}
},
"openj9": {
@@ -87,9 +87,9 @@
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "97dc8234b73e233316b5dfdca75af9a0d54aa23b1309b1a68fd0a5d2fa928e05",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jdk_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
"version": "11.0.5"
"sha256": "9a5c5b3bb51a82e666c46b2d1bbafa8c2bbc3aae50194858c8f96c5d43a96f64",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
"version": "11.0.6"
}
}
},
@@ -99,9 +99,9 @@
"vmType": "hotspot",
"x86_64": {
"build": "10",
"sha256": "dfd212023321ebb41bce8cced15b4668001e86ecff6bffdd4f2591ccaae41566",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10/OpenJDK11U-jre_x64_mac_hotspot_11.0.5_10.tar.gz",
"version": "11.0.5"
"sha256": "ab3c2038a32c62843500109d2efb8f5dacdfa1de3cbb713c8226f26dc603cc33",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_x64_mac_hotspot_11.0.6_10.tar.gz",
"version": "11.0.6"
}
},
"openj9": {
@@ -109,9 +109,9 @@
"vmType": "openj9",
"x86_64": {
"build": "10",
"sha256": "ea6bd0be4562e766c035b997447c059d10d5d2e58ca464c57f9078858da1c967",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.5%2B10.1_openj9-0.17.0/OpenJDK11U-jre_x64_mac_openj9_11.0.5_10_openj9-0.17.0.tar.gz",
"version": "11.0.5"
"sha256": "130850133d9701393352c2ce13ab541b4f900ff1f5ddf8257cda624968aada9f",
"url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jre_x64_mac_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
"version": "11.0.6"
}
}
}
@@ -127,23 +127,35 @@
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"armv6l": {
"build": "9",
"sha256": "fdd9f61f1b2df74242da54ee3b3231b0123782a917e9673351276da439c7cab1",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"armv7l": {
"build": "9",
"sha256": "fdd9f61f1b2df74242da54ee3b3231b0123782a917e9673351276da439c7cab1",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "7b7884f2eb2ba2d47f4c0bf3bb1a2a95b73a3a7734bd47ebf9798483a7bcc423",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "f39b523c724d0e0047d238eb2bb17a9565a60574cf651206c867ee5fc000ab43",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz",
"version": "8.0.242"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "abea758c7e102f3c4a3be8757ee0ce039a70e2d498c160400dfb83c6f7004dbf",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "ca785af638b24f9d4df896f5a9f557cc9f1e5fa5e2b1174d6b906e3fd5474c2e",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jdk_x64_linux_openj9_8u242b08_openj9-0.18.1.tar.gz",
"version": "8.0.242"
}
}
},
@@ -155,23 +167,35 @@
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_aarch64_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"armv6l": {
"build": "9",
"sha256": "8ab786fc2fa0a282f5cf57f6040f1976c32c3c5e480e900ce5925de6543f6688",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_arm_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"armv7l": {
"build": "9",
"sha256": "8ab786fc2fa0a282f5cf57f6040f1976c32c3c5e480e900ce5925de6543f6688",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_arm_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
},
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "bd06b84a1fc10e0a555431bc49a84e86df45de0be93c8ee4d09d13513219843b",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_linux_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "5edfaefdbb0469d8b24d61c8aef80c076611053b1738029c0232b9a632fe2708",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_linux_hotspot_8u242b08.tar.gz",
"version": "8.0.242"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "30bdfdb38901d4807d96a72a33b83f7a4f40255e11a88853c1e8732acc4644a7",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09_openj9-0.17.0/OpenJDK8U-jre_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "985d3134b64c6196d4c9ddbc87af0c62b0e643cef71b29f3d25a8c7811811745",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jre_x64_linux_openj9_8u242b08_openj9-0.18.1.tar.gz",
"version": "8.0.242"
}
}
}
@@ -182,20 +206,20 @@
"packageType": "jdk",
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "c237b2c2c32c893e4ee60cdac8c4bcc34ca731a5445986c03b95cf79918e40c3",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_x64_mac_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "06675b7d65bce0313ee1f2e888dd44267e8afeced75e0b39b5ad1f5fdff54e0b",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_mac_hotspot_8u242b08.tar.gz",
"version": "8.0.242"
}
},
"openj9": {
"packageType": "jdk",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "168079dcc20f62ac4409800c78d23a63ba7c665e58cd7ac8bde21ebbbb2b6d48",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jdk_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "665dc9c8239b7270b007ab9dd7522570e2686e327d89caf57a6aa6e5c6450078",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jdk_x64_mac_openj9_8u242b08_openj9-0.18.1.tar.gz",
"version": "8.0.242"
}
}
},
@@ -204,20 +228,20 @@
"packageType": "jre",
"vmType": "hotspot",
"x86_64": {
"build": "9",
"sha256": "5ec5f11dbc81ab65641b765e1ef2f924736c0d1cc797cb95b078598d9d863afd",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_x64_mac_hotspot_8u232b09.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "fae3777e3441dc7384c339a9054aa7efc40cd2c501625a535c2d4648367ccca3",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_mac_hotspot_8u242b08.tar.gz",
"version": "8.0.242"
}
},
"openj9": {
"packageType": "jre",
"vmType": "openj9",
"x86_64": {
"build": "9",
"sha256": "60b70aa16c8ca38b96c305003f3d9871897555d0b4039b8e1f8db9ceeab16d53",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09.1_openj9-0.17.0/OpenJDK8U-jre_x64_mac_openj9_8u232b09_openj9-0.17.0.tar.gz",
"version": "8.0.232"
"build": "8",
"sha256": "d4a924558ddda0aed671a67f71714b71c25871a7659fd4c505851cf5ee866de5",
"url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jre_x64_mac_openj9_8u242b08_openj9-0.18.1.tar.gz",
"version": "8.0.242"
}
}
}

View File

@@ -0,0 +1,94 @@
{ stdenv
, fetchFromGitHub
, fetchpatch
, autoconf
, automake
, fontconfig
, gmp
, gperf
, haskell
, libX11
, libpoly
, perl
, pkgconfig
, verilog
, xorg
, zlib
}:
let
# yices wants a libgmp.a and fails otherwise
gmpStatic = gmp.override { withStatic = true; };
# Compiling PreludeBSV fails with more recent GHC versions
# > imperative statement (not BVI context)
# https://github.com/B-Lang-org/bsc/issues/20#issuecomment-583724030
ghcWithPackages = haskell.packages.ghc844.ghc.withPackages (g: (with g; [old-time regex-compat syb]));
in stdenv.mkDerivation rec {
pname = "bluespec";
version = "unstable-2020.02.09";
src = fetchFromGitHub {
owner = "B-Lang-org";
repo = "bsc";
rev = "05c8afb08078e437c635b9c708124b428ac51b3d";
sha256 = "06yhpkz7wga1a0p9031cfjqbzw7205bj2jxgdghhfzmllaiphniy";
fetchSubmodules = true;
};
enableParallelBuilding = true;
buildInputs = [
zlib
gmpStatic gperf libpoly # yices
libX11 # tcltk
xorg.libXft
fontconfig
];
nativeBuildInputs = [
automake autoconf
perl
pkgconfig
ghcWithPackages
];
checkInputs = [
verilog
];
patches = [
# drop stp support https://github.com/B-Lang-org/bsc/pull/31
(fetchpatch {
url = "https://github.com/flokli/bsc/commit/0bd48ecc2561541dc1368918863c0b2f4915006f.patch";
sha256 = "0bam9anld33zfi9d4gs502g94w49zhl5iqmbs2d1p5i19aqpy38l";
})
];
preBuild = ''
patchShebangs \
src/Verilog/copy_module.pl \
src/comp/update-build-version.sh \
src/comp/update-build-system.sh \
src/comp/wrapper.sh
'';
makeFlags = [
"NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
"LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43
];
installPhase = "mv inst $out";
doCheck = true;
meta = {
description = "Toolchain for the Bluespec Hardware Definition Language";
homepage = "https://github.com/B-Lang-org/bsc";
license = stdenv.lib.licenses.bsd3;
platforms = [ "x86_64-linux" ];
# darwin fails at https://github.com/B-Lang-org/bsc/pull/35#issuecomment-583731562
# aarch64 fails, as GHC fails with "ghc: could not execute: opt"
maintainers = with stdenv.lib.maintainers; [ flokli thoughtpolice ];
};
}

View File

@@ -303,7 +303,7 @@ stdenv.mkDerivation ({
compiler used in the GNU system including the GNU/Linux variant.
'';
maintainers = with stdenv.lib.maintainers; [ peti ];
maintainers = with stdenv.lib.maintainers; [ peti veprbl ];
platforms =
stdenv.lib.platforms.linux ++

View File

@@ -1,252 +0,0 @@
{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langObjC ? stdenv.targetPlatform.isDarwin
, langObjCpp ? stdenv.targetPlatform.isDarwin
, langGo ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
, enableLTO ? true
, texinfo ? null
, perl ? null # optional, for texi2pod (then pod2man)
, gmp, mpfr, libmpc, gettext, which
, libelf # optional, for link-time optimizations (LTO)
, isl ? null # optional, for the Graphite optimization framework.
, zlib ? null
, enableMultilib ? false
, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
, name ? "gcc"
, libcCross ? null
, threadsCross ? null # for MinGW
, crossStageStatic ? false
, # Strip kills static libs of other archs (hence no cross)
stripped ? stdenv.hostPlatform == stdenv.buildPlatform
&& stdenv.targetPlatform == stdenv.hostPlatform
, gnused ? null
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
, flex ? null
, buildPackages
}:
# LTO needs libelf and zlib.
assert libelf != null -> zlib != null;
# Make sure we get GNU sed.
assert stdenv.hostPlatform.isDarwin -> gnused != null;
# The go frontend is written in c++
assert langGo -> langCC;
# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
with stdenv.lib;
with builtins;
let majorVersion = "7";
version = "${majorVersion}-20170409";
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
[ ]
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
++ optional langFortran ../gfortran-driving.patch
++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay";
});
/* Cross-gcc settings (build == host != target) */
crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
in
stdenv.mkDerivation ({
pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
inherit version;
builder = ../builder.sh;
src = fetchurl {
url = "mirror://gcc/snapshots/${version}/gcc-${version}.tar.bz2";
sha256 = "19197rw1xrpkb8h10lfgn6zj7yj52x95hdmr0x5lg8i4v3i23b67";
};
inherit patches;
outputs = [ "out" "lib" "man" "info" ];
setOutputFlags = false;
NIX_NO_SELF_RPATH = true;
libc_dev = stdenv.cc.libc_dev;
hardeningDisable = [ "format" "pie" ];
postPatch =
if targetPlatform != hostPlatform || stdenv.cc.libc != null then
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if libcCross != null then libcCross else stdenv.cc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
do
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
echo " fixing \`$header'..."
sed -i "$header" \
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
done
''
else null;
inherit noSysDirs staticCompiler crossStageStatic
libcCross crossMingw;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl);
# For building runtime libs
depsBuildTarget =
if hostPlatform == buildPlatform then [
targetPackages.stdenv.cc.bintools # newly-built gcc will be used
] else assert targetPlatform == hostPlatform; [ # build != host == target
stdenv.cc
];
buildInputs = [
gmp mpfr libmpc libelf flex
targetPackages.stdenv.cc.bintools # For linking code at run-time
] ++ (optional (isl != null) isl)
++ (optional (zlib != null) zlib)
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
++ (optional hostPlatform.isDarwin gnused)
;
depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
NIX_LDFLAGS = stdenv.lib.optionalString hostPlatform.isSunOS "-lm -ldl";
preConfigure = import ../common/pre-configure.nix {
inherit (stdenv) lib;
inherit version hostPlatform langGo;
};
dontDisableStatic = true;
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = import ../common/configure-flags.nix {
inherit
stdenv
targetPackages
crossStageStatic libcCross
version
gmp mpfr libmpc libelf isl
enableLTO
enableMultilib
enablePlugin
enableShared
langC
langCC
langFortran
langGo
langObjC
langObjCpp
;
};
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
dontStrip = !stripped;
NIX_STRIP_DEBUG = !stripped;
installTargets =
if stripped
then "install-strip"
else "install";
# https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
# library headers and binaries, regarless of the language being compiled.
#
# Likewise, the LTO code doesn't find zlib.
#
# Cross-compiling, we need gcc not to read ./specs in order to build the g++
# compiler (after the specs for the cross-gcc are created). Having
# LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
++ optional (zlib != null) zlib
));
LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
inherit
(import ../common/extra-target-flags.nix {
inherit stdenv crossStageStatic libcCross threadsCross;
})
EXTRA_TARGET_FLAGS
EXTRA_TARGET_LDFLAGS
;
passthru = {
inherit langC langCC langObjC langObjCpp langFortran langGo version;
isGNU = true;
};
enableParallelBuilding = true;
inherit enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = https://gcc.gnu.org/;
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
description = "GNU Compiler Collection, version ${version}"
+ (if stripped then "" else " (with debugging info)");
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
libraries for these languages (libstdc++, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant.
'';
maintainers = with stdenv.lib.maintainers; [ ];
platforms =
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
broken = true;
};
}
// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
makeFlags = [ "all-gcc" "all-target-libgcc" ];
installTargets = "install-gcc install-target-libgcc";
}
// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
)