diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 24680754c8d5..597e8105fa1d 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -17,7 +17,6 @@ , isGNU ? false, isClang ? cc.isClang or false, gnugrep ? null , buildPackages ? {} , libcxx ? null -, grossHackForStagingNext ? false # Whether or not to add `-B` and `-L` to `nix-support/cc-{c,ld}flags` , useCcForLibs ? @@ -408,11 +407,7 @@ stdenv.mkDerivation { touch "$out/nix-support/libcxx-cxxflags" touch "$out/nix-support/libcxx-ldflags" '' - # Adding -isystem flags should be done only for clang; gcc - # already knows how to find its own libstdc++, and adding - # additional -isystem flags will confuse gfortran (see - # https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903) - + optionalString (libcxx == null && (if grossHackForStagingNext then isClang else true) && (useGccForLibs && gccForLibs.langCC or false)) '' + + optionalString (libcxx == null && (useGccForLibs && gccForLibs.langCC or false)) '' for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags done diff --git a/pkgs/development/compilers/gcc/12/default.nix b/pkgs/development/compilers/gcc/12/default.nix index bf1c6e2ffae8..ffe94eab3ce3 100644 --- a/pkgs/development/compilers/gcc/12/default.nix +++ b/pkgs/development/compilers/gcc/12/default.nix @@ -29,7 +29,6 @@ , buildPackages , libxcrypt , disableGdbPlugin ? !enablePlugin -, disableBootstrap ? !stdenv.hostPlatform.isDarwin , nukeReferences , callPackage }: @@ -57,6 +56,7 @@ with builtins; let majorVersion = "12"; version = "${majorVersion}.2.0"; + disableBootstrap = !stdenv.hostPlatform.isDarwin; inherit (stdenv) buildPlatform hostPlatform targetPlatform; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3bec8181f210..f0c79e15cf55 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14855,15 +14855,6 @@ with pkgs; profiledCompiler = false; }); - gfortran-tmp-noisystem = wrapCCWith { grossHackForStagingNext = true; cc = (gcc.cc.override { - name = "gfortran"; - langFortran = true; - langCC = false; - langC = false; - profiledCompiler = false; - disableBootstrap = false; - }); }; - gfortran48 = wrapCC (gcc48.cc.override { name = "gfortran"; langFortran = true; @@ -15345,12 +15336,8 @@ with pkgs; julia_16-bin = callPackage ../development/compilers/julia/1.6-bin.nix { }; julia_18-bin = callPackage ../development/compilers/julia/1.8-bin.nix { }; - julia_18 = callPackage ../development/compilers/julia/1.8.nix { - gfortran = gfortran-tmp-noisystem; - }; - julia_19 = callPackage ../development/compilers/julia/1.9.nix { - gfortran = gfortran-tmp-noisystem; - }; + julia_18 = callPackage ../development/compilers/julia/1.8.nix { }; + julia_19 = callPackage ../development/compilers/julia/1.9.nix { }; julia-lts-bin = julia_16-bin; julia-stable-bin = julia_18-bin;