From 54849e2fb8dd2862e6db07d18fed9bfd4f95544b Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Wed, 12 Mar 2025 17:02:46 +0100 Subject: [PATCH] gcc: fix inconsistency in isCross condition In libgcc.nix, `targetPlatformSlash` is set by checking if hostPlatform == targetPlatform. In default.nix, `targetConfig` (which is also going to be part of the path) is also set by checking if hostPlatform == targetPlatform. However, in common.nix, the recently added `isCross` is set by checking if hostPlatform.config == targetPlatform.config. This means that for platforms like '-nolibc' the paths in common.nix are not set up correctly for libgcc.nix to find and move libgcc_s.so . Changing isCross to also check hostPlatform == targetPlatform fixes this issue. --- pkgs/development/compilers/gcc/common/builder.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/gcc/common/builder.nix b/pkgs/development/compilers/gcc/common/builder.nix index 47b3ed1d3adc..9f24a41e97d4 100644 --- a/pkgs/development/compilers/gcc/common/builder.nix +++ b/pkgs/development/compilers/gcc/common/builder.nix @@ -7,7 +7,7 @@ let forceLibgccToBuildCrtStuff = import ./libgcc-buildstuff.nix { inherit lib stdenv; }; - isCross = with stdenv; targetPlatform.config != hostPlatform.config; + isCross = with stdenv; targetPlatform != hostPlatform; in # We don't support multilib and cross at the same time