Commit 75104490 authored by Sergei Trofimovich's avatar Sergei Trofimovich Committed by Weijia Wang
Browse files

gcc14, gfortran14, gnat14, gccgo14: init at 14.1.0

parent 7a3d8b93
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@ let
  version = gccVersions.fromMajorMinor majorMinorVersion;

  majorVersion = versions.major version;
  atLeast14 = versionAtLeast version "14";
  atLeast13 = versionAtLeast version "13";
  atLeast12 = versionAtLeast version "12";
  atLeast11 = versionAtLeast version "11";
@@ -79,6 +80,7 @@ let
  atLeast7  = versionAtLeast version  "7";
  atLeast6  = versionAtLeast version  "6";
  atLeast49 = versionAtLeast version  "4.9";
  is14 = majorVersion == "14";
  is13 = majorVersion == "13";
  is12 = majorVersion == "12";
  is11 = majorVersion == "11";
+3 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
}:

let
  atLeast14 = lib.versionAtLeast version "14";
  atLeast13 = lib.versionAtLeast version "13";
  atLeast12 = lib.versionAtLeast version "12";
  atLeast11 = lib.versionAtLeast version "11";
@@ -34,6 +35,7 @@ let
  atLeast7  = lib.versionAtLeast version  "7";
  atLeast6  = lib.versionAtLeast version  "6";
  atLeast49 = lib.versionAtLeast version  "4.9";
  is14 = majorVersion == "14";
  is13 = majorVersion == "13";
  is12 = majorVersion == "12";
  is11 = majorVersion == "11";
@@ -63,6 +65,7 @@ in
++ optionals (noSysDirs) (
  [(if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch)] ++
  ({
    "14" = [ ./13/no-sys-dirs-riscv.patch ./13/mangle-NIX_STORE-in-__FILE__.patch ];
    "13" = [ ./13/no-sys-dirs-riscv.patch ./13/mangle-NIX_STORE-in-__FILE__.patch ];
    "12" = [ ./no-sys-dirs-riscv.patch ./12/mangle-NIX_STORE-in-__FILE__.patch ];
    "11" = [ ./no-sys-dirs-riscv.patch ];
+2 −0
Original line number Diff line number Diff line
let
  majorMinorToVersionMap = {
    "14" = "14.1.0";
    "13" = "13.2.0";
    "12" = "12.3.0";
    "11" = "11.4.0";
@@ -19,6 +20,7 @@ let
  srcHashForVersion = version: {
    # NOTE: there is no need to remove hashes of obsolete minor
    # versions when adding a new minor version.
    "14.1.0" = "sha256-4oPGVJh6/j3p2AgLwL15U0tcoNaBpzoR/ytdN2dCaEA=";
    "13.2.0" = "sha256-4nXnZEKmBnNBon8Exca4PYYTFEAEwEE1KIY9xrXHQ9o=";
    "12.3.0" = "sha256-lJpdT5nnhkIak7Uysi/6tVeN5zITaZdbka7Jet/ajDs=";
    "11.4.0" = "sha256-Py2yIrAH6KSiPNW6VnJu8I6LHx6yBV7nLBQCzqc6jdk=";
+46 −2
Original line number Diff line number Diff line
@@ -15491,6 +15491,7 @@ with pkgs;
  gcc11Stdenv = overrideCC gccStdenv buildPackages.gcc11;
  gcc12Stdenv = overrideCC gccStdenv buildPackages.gcc12;
  gcc13Stdenv = overrideCC gccStdenv buildPackages.gcc13;
  gcc14Stdenv = overrideCC gccStdenv buildPackages.gcc14;
  # This is not intended for use in nixpkgs but for providing a faster-running
  # compiler to nixpkgs users by building gcc with reproducibility-breaking
@@ -15581,9 +15582,9 @@ with pkgs;
  };
  inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; })
    gcc48 gcc49 gcc6 gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13;
    gcc48 gcc49 gcc6 gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13 gcc14;
  gcc_latest = gcc13;
  gcc_latest = gcc14;
  # Use the same GCC version as the one from stdenv by default
  gfortran = wrapCC (gcc.cc.override {
@@ -15674,6 +15675,14 @@ with pkgs;
    profiledCompiler = false;
  });
  gfortran14 = wrapCC (gcc14.cc.override {
    name = "gfortran";
    langFortran = true;
    langCC = false;
    langC = false;
    profiledCompiler = false;
  });
  libgccjit = gcc.cc.override {
    name = "libgccjit";
    langFortran = false;
@@ -15767,6 +15776,29 @@ with pkgs;
      else stdenv;
  });
  gnat14 = wrapCC (gcc14.cc.override {
    name = "gnat";
    langC = true;
    langCC = false;
    langAda = true;
    profiledCompiler = false;
    # As per upstream instructions building a cross compiler
    # should be done with a (native) compiler of the same version.
    # If we are cross-compiling GNAT, we may as well do the same.
    gnat-bootstrap =
      if stdenv.hostPlatform == stdenv.targetPlatform
         && stdenv.buildPlatform == stdenv.hostPlatform
      then buildPackages.gnat-bootstrap12
      else buildPackages.gnat13;
    stdenv =
      if stdenv.hostPlatform == stdenv.targetPlatform
         && stdenv.buildPlatform == stdenv.hostPlatform
         && stdenv.buildPlatform.isDarwin
         && stdenv.buildPlatform.isx86_64
      then overrideCC stdenv gnat-bootstrap12
      else stdenv;
  });
  gnat-bootstrap = gnat-bootstrap12;
  gnat-bootstrap11 = wrapCC (callPackage ../development/compilers/gnat-bootstrap { majorVersion = "11"; });
  gnat-bootstrap12 = wrapCCWith ({
@@ -15821,6 +15853,18 @@ with pkgs;
    meta.broken = stdenv.hostPlatform.isDarwin;
  });
  gccgo14 = wrapCC (gcc14.cc.override {
    name = "gccgo";
    langCC = true; #required for go.
    langC = true;
    langGo = true;
    langJit = true;
    profiledCompiler = false;
  } // {
    # not supported on darwin: https://github.com/golang/go/issues/463
    meta.broken = stdenv.hostPlatform.isDarwin;
  });
  ghdl = ghdl-mcode;
  ghdl-mcode = callPackage ../development/compilers/ghdl {