diff --git a/pkgs/development/compilers/gcc/11/default.nix b/pkgs/development/compilers/gcc/11/default.nix index ba4b10cf73e..607c9eeac2f 100644 --- a/pkgs/development/compilers/gcc/11/default.nix +++ b/pkgs/development/compilers/gcc/11/default.nix @@ -56,7 +56,8 @@ let majorVersion = "11"; # updated version is not available. Keep aarch64-darwin on 11.2.0 so the # large body of packages which depend on gfortran are still functional # until GCC 12 is the default. - version = if (stdenv.isDarwin && stdenv.isAarch64) then + # On x86_64-darwin, building libgcc suffers from some different issues with 11.3.0. + version = if stdenv.isDarwin then "${majorVersion}.2.0" else "${majorVersion}.3.0"; inherit (stdenv) buildPlatform hostPlatform targetPlatform; @@ -96,7 +97,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - sha256 = if (stdenv.isDarwin && stdenv.isAarch64) + sha256 = if stdenv.isDarwin then "sha256-0I7cU2tUw3KhAQ/2YZ3SdMDxYDqkkhK6IPeqLNo2+os=" else "sha256-tHzygYaR9bHiHfK7OMeV+sLPvWQO3i0KXhyJ4zijrDk="; };