From b09f87fb0d809cb02605900280a8e8ea3d666369 Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 6 Nov 2023 16:54:45 -0500 Subject: [PATCH] gcc48: disable on x86_64-darwin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to Hydra, the last time GCC 4.8 successfully built on Darwin was October 2014. It is possible to make the first stage build successfully with clang, but the resulting GCC is not capable of reading the Darwin SDK headers due to their use of `__can_include`. It’s been broken for almost a decade, so just disable it. --- pkgs/development/compilers/gcc/all.nix | 3 --- pkgs/development/compilers/gcc/default.nix | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/development/compilers/gcc/all.nix b/pkgs/development/compilers/gcc/all.nix index 82a64f48c37e..70b4b75369a7 100644 --- a/pkgs/development/compilers/gcc/all.nix +++ b/pkgs/development/compilers/gcc/all.nix @@ -34,9 +34,6 @@ let else /* "4.8" */ isl_0_14; } // lib.optionalAttrs (majorMinorVersion == "4.8") { texinfo = texinfo5; # doesn't validate since 6.1 -> 6.3 bump - } // lib.optionalAttrs (majorMinorVersion == "4.9") { - # Build fails on Darwin with clang - stdenv = if stdenv.isDarwin then gccStdenv else stdenv; } // lib.optionalAttrs (!(atLeast "6")) { cloog = if stdenv.isDarwin then null diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 0980944dfc29..895aed5461c1 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -408,7 +408,7 @@ lib.pipe ((callFile ./common/builder.nix {}) ({ maintainers ; } // lib.optionalAttrs (!atLeast11) { - badPlatforms = if !is49 then [ "aarch64-darwin" ] else lib.platforms.darwin; + badPlatforms = if !(is48 || is49) then [ "aarch64-darwin" ] else lib.platforms.darwin; }; } // optionalAttrs is7 { env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";