Unverified Commit 38ba06c7 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge #321435: Revert #320852: Clean up cross bootstrapping

parents 168a8ce3 87982177
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -10,15 +10,15 @@
, stdenvNoCC
, runtimeShell
, bintools ? null, libc ? null, coreutils ? null, gnugrep ? null
, netbsd ? null
, netbsd ? null, netbsdCross ? null
, sharedLibraryLoader ?
  if libc == null then
    null
  else if stdenvNoCC.targetPlatform.isNetBSD then
    if !(targetPackages ? netbsd) then
    if !(targetPackages ? netbsdCross) then
      netbsd.ld_elf_so
    else if libc != targetPackages.netbsd.headers then
      targetPackages.netbsd.ld_elf_so
    else if libc != targetPackages.netbsdCross.headers then
      targetPackages.netbsdCross.ld_elf_so
    else
      null
  else
+1 −2
Original line number Diff line number Diff line
{ lib
, stdenvNoLibc
, stdenv
, buildPackages
, fetchurl
, gitUpdater
@@ -9,7 +9,6 @@
}:

let
  stdenv = stdenvNoLibc;
  isCross = (stdenv.buildPlatform != stdenv.hostPlatform);
  configParser = ''
    function parseconfig {
+2 −2
Original line number Diff line number Diff line
{ stdenv, texinfo, flex, bison, fetchFromGitHub, stdenvNoLibc, buildPackages }:
{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:

stdenvNoLibc.mkDerivation {
crossLibcStdenv.mkDerivation {
  name = "newlib";
  src = fetchFromGitHub {
    owner = "openrisc";
+2 −2
Original line number Diff line number Diff line
{ stdenv, texinfo, flex, bison, fetchFromGitHub, stdenvNoLibc, buildPackages }:
{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:

stdenvNoLibc.mkDerivation {
crossLibcStdenv.mkDerivation {
  name = "newlib";
  src = fetchFromGitHub {
    owner = "itszor";
+37 −25
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  makeScopeWithSplicing',
  generateSplicesForMkScope,
  callPackage,
  crossLibcStdenv,
  attributePathToSplice ? [ "freebsd" ],
  branch ? "release/14.0.0",
}:
@@ -23,11 +24,6 @@ let
      Branches can be selected by overriding the `branch` attribute on the freebsd package set.
    '';

  # we do not include the branch in the splice here because the branch
  # parameter to this file will only ever take on one value - more values
  # are provided through overrides.
  otherSplices = generateSplicesForMkScope attributePathToSplice;
in
  # `./package-set.nix` should never know the name of the package set we
  # are constructing; just this function is allowed to know that. This
  # is why we:
@@ -36,6 +32,14 @@ in
  #
  #  - construct the *anonymized* `buildFreebsd` attribute to be passed
  #    to `./package-set.nix`.
  callFreeBSDWithAttrs =
    extraArgs:
    let
      # we do not include the branch in the splice here because the branch
      # parameter to this file will only ever take on one value - more values
      # are provided through overrides.
      otherSplices = generateSplicesForMkScope attributePathToSplice;
    in
    makeScopeWithSplicing' {
      inherit otherSplices;
      f =
@@ -43,10 +47,18 @@ makeScopeWithSplicing' {
        {
          inherit branch;
        }
    // callPackage ./package-set.nix ({
        // callPackage ./package-set.nix (
          {
            sourceData = versions.${self.branch} or (throw (badBranchError self.branch));
            versionData = self.sourceData.version;
            buildFreebsd = otherSplices.selfBuildHost;
            patchesRoot = ./patches + "/${self.versionData.revision}";
    }) self;
          }
          // extraArgs
        ) self;
    };
in
{
  freebsd = callFreeBSDWithAttrs { };
  freebsdCross = callFreeBSDWithAttrs { stdenv = crossLibcStdenv; };
}
Loading