From 527ea54d6784990aacc24716f1263882cb7f6b3a Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 14 Sep 2025 11:42:44 +0200 Subject: [PATCH] nix: Don't use ld.gold for powerpc64 cross Tons of errors like: /nix/store/y3bib7c8vpx66xypjflw783ml392105l-powerpc64-unknown-linux-gnuabielfv1-binutils-2.44/bin/powerpc64-unknown-linux-gnuabielfv1-ld.gold: error: /build/ccg9tPoL.debug.temp.o: could not decompress section .debug_str /nix/store/y3bib7c8vpx66xypjflw783ml392105l-powerpc64-unknown-linux-gnuabielfv1-binutils-2.44/bin/powerpc64-unknown-linux-gnuabielfv1-ld.gold: error: /build/ccg9tPoL.debug.temp.o: could not decompress section .debug_line_str /nix/store/y3bib7c8vpx66xypjflw783ml392105l-powerpc64-unknown-linux-gnuabielfv1-binutils-2.44/bin/powerpc64-unknown-linux-gnuabielfv1-ld.gold: warning: /build/ccg9tPoL.debug.temp.o: last entry in mergeable string section '.debug_line_str' not null terminated --- .../package-management/nix/modular/packaging/components.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/package-management/nix/modular/packaging/components.nix b/pkgs/tools/package-management/nix/modular/packaging/components.nix index 3ce3f2938d89..67d96fa6e253 100644 --- a/pkgs/tools/package-management/nix/modular/packaging/components.nix +++ b/pkgs/tools/package-management/nix/modular/packaging/components.nix @@ -156,6 +156,10 @@ let // lib.optionalAttrs ( stdenv.isLinux && !(stdenv.hostPlatform.isStatic && stdenv.system == "aarch64-linux") + && !( + stdenv.buildPlatform.config != stdenv.hostPlatform.config + && stdenv.hostPlatform.system == "powerpc64-linux" + ) && !(stdenv.system == "loongarch64-linux") && !(stdenv.hostPlatform.useLLVM or false) ) { LDFLAGS = "-fuse-ld=gold"; };