Unverified Commit e2cb76e4 authored by zowoq's avatar zowoq Committed by GitHub
Browse files

go: drop gccgo bootstrap, drop autoPatchelfHook from bootstrap (#322825)



bootstrap binaries are static since 1.21

Co-authored-by: default avatarIvan Trubach <mr.trubach@icloud.com>
parent b528eac1
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
}:

let
  useGccGoBootstrap = stdenv.buildPlatform.isMusl;
  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap121.nix { };
  goBootstrap = buildPackages.callPackage ./bootstrap121.nix { };

  skopeoTest = skopeo.override { buildGoModule = buildGo121Module; };

@@ -115,7 +114,7 @@ stdenv.mkDerivation (finalAttrs: {
  GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
  CGO_ENABLED = 1;

  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
  GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

  buildPhase = ''
    runHook preBuild
+2 −3
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
}:

let
  useGccGoBootstrap = stdenv.buildPlatform.isMusl;
  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap121.nix { };
  goBootstrap = buildPackages.callPackage ./bootstrap121.nix { };

  skopeoTest = skopeo.override { buildGoModule = buildGo122Module; };

@@ -117,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
  # Wasi does not support CGO
  CGO_ENABLED = if stdenv.targetPlatform.isWasi then 0 else 1;

  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
  GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

  buildPhase = ''
    runHook preBuild
+2 −3
Original line number Diff line number Diff line
@@ -17,8 +17,7 @@
}:

let
  useGccGoBootstrap = stdenv.buildPlatform.isMusl;
  goBootstrap = if useGccGoBootstrap then buildPackages.gccgo12 else buildPackages.callPackage ./bootstrap121.nix { };
  goBootstrap = buildPackages.callPackage ./bootstrap121.nix { };

  skopeoTest = skopeo.override { buildGoModule = buildGo123Module; };

@@ -117,7 +116,7 @@ stdenv.mkDerivation (finalAttrs: {
  # Wasi does not support CGO
  CGO_ENABLED = if stdenv.targetPlatform.isWasi then 0 else 1;

  GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go";
  GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";

  buildPhase = ''
    runHook preBuild
+1 −3
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, version, hashes, autoPatchelfHook }:
{ lib, stdenv, fetchurl, version, hashes }:
let
  toGoKernel = platform:
    if platform.isDarwin then "darwin"
@@ -26,8 +26,6 @@ stdenv.mkDerivation rec {
    sha256 = hashes.${platform} or (throw "Missing Go bootstrap hash for platform ${platform}");
  };

  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];

  # We must preserve the signature on Darwin
  dontStrip = stdenv.hostPlatform.isDarwin;