From 83c10203a251adc0000881c308ae119308245a22 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 20 Jul 2025 15:32:18 +0200 Subject: [PATCH] go: Mark powerpc64-linux as badPlatform Since 1.9, there is no support for POWER < 8, and no interest upstream in supporting it again. --- pkgs/development/compilers/go/1.23.nix | 7 +++++++ pkgs/development/compilers/go/1.24.nix | 7 +++++++ pkgs/development/compilers/go/1.25.nix | 7 +++++++ pkgs/development/compilers/go/binary.nix | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/pkgs/development/compilers/go/1.23.nix b/pkgs/development/compilers/go/1.23.nix index 76368433205b..4a8bb063a979 100644 --- a/pkgs/development/compilers/go/1.23.nix +++ b/pkgs/development/compilers/go/1.23.nix @@ -163,6 +163,13 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; teams = [ teams.golang ]; platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi ++ platforms.freebsd; + badPlatforms = [ + # Support for big-endian POWER < 8 was dropped in 1.9, but POWER8 users have less of a reason to run in big-endian mode than pre-POWER8 ones + # So non-LE ppc64 is effectively unsupported, and Go SIGILLs on affordable ppc64 hardware + # https://github.com/golang/go/issues/19074 - Dropped support for big-endian POWER < 8, with community pushback + # https://github.com/golang/go/issues/73349 - upstream will not accept submissions to fix this + "powerpc64-linux" + ]; mainProgram = "go"; }; }) diff --git a/pkgs/development/compilers/go/1.24.nix b/pkgs/development/compilers/go/1.24.nix index fbccce4cd017..14787746ac19 100644 --- a/pkgs/development/compilers/go/1.24.nix +++ b/pkgs/development/compilers/go/1.24.nix @@ -163,6 +163,13 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; teams = [ teams.golang ]; platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi ++ platforms.freebsd; + badPlatforms = [ + # Support for big-endian POWER < 8 was dropped in 1.9, but POWER8 users have less of a reason to run in big-endian mode than pre-POWER8 ones + # So non-LE ppc64 is effectively unsupported, and Go SIGILLs on affordable ppc64 hardware + # https://github.com/golang/go/issues/19074 - Dropped support for big-endian POWER < 8, with community pushback + # https://github.com/golang/go/issues/73349 - upstream will not accept submissions to fix this + "powerpc64-linux" + ]; mainProgram = "go"; }; }) diff --git a/pkgs/development/compilers/go/1.25.nix b/pkgs/development/compilers/go/1.25.nix index b5cbfd3aa802..99b684cca449 100644 --- a/pkgs/development/compilers/go/1.25.nix +++ b/pkgs/development/compilers/go/1.25.nix @@ -168,6 +168,13 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; teams = [ teams.golang ]; platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi ++ platforms.freebsd; + badPlatforms = [ + # Support for big-endian POWER < 8 was dropped in 1.9, but POWER8 users have less of a reason to run in big-endian mode than pre-POWER8 ones + # So non-LE ppc64 is effectively unsupported, and Go SIGILLs on affordable ppc64 hardware + # https://github.com/golang/go/issues/19074 - Dropped support for big-endian POWER < 8, with community pushback + # https://github.com/golang/go/issues/73349 - upstream will not accept submissions to fix this + "powerpc64-linux" + ]; mainProgram = "go"; }; }) diff --git a/pkgs/development/compilers/go/binary.nix b/pkgs/development/compilers/go/binary.nix index b32b70a392ec..46f649930455 100644 --- a/pkgs/development/compilers/go/binary.nix +++ b/pkgs/development/compilers/go/binary.nix @@ -35,5 +35,12 @@ stdenv.mkDerivation { license = lib.licenses.bsd3; teams = [ lib.teams.golang ]; platforms = lib.platforms.darwin ++ lib.platforms.linux; + badPlatforms = [ + # Support for big-endian POWER < 8 was dropped in 1.9, but POWER8 users have less of a reason to run in big-endian mode than pre-POWER8 ones + # So non-LE ppc64 is effectively unsupported, and Go SIGILLs on affordable ppc64 hardware + # https://github.com/golang/go/issues/19074 - Dropped support for big-endian POWER < 8, with community pushback + # https://github.com/golang/go/issues/73349 - upstream will not accept submissions to fix this + "powerpc64-linux" + ]; }; }