diff --git a/pkgs/by-name/gf/gfortran16/package.nix b/pkgs/by-name/gf/gfortran16/package.nix new file mode 100644 index 000000000000..4236e7c7716a --- /dev/null +++ b/pkgs/by-name/gf/gfortran16/package.nix @@ -0,0 +1,10 @@ +{ wrapCC, gcc16 }: +wrapCC ( + gcc16.cc.override { + name = "gfortran"; + langFortran = true; + langCC = false; + langC = false; + profiledCompiler = false; + } +) diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 17d8b9590ead..5be64c16ce84 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -58,6 +58,16 @@ optionals noSysDirs ( ] ++ ( { + "16" = [ + # Do not try looking for binaries and libraries in /lib and /usr/lib + ./13/no-sys-dirs-riscv.patch + # Mangle the nix store hash in __FILE__ to prevent unneeded runtime references + # + # TODO: Remove these and the `useMacroPrefixMap` conditional + # in `cc-wrapper` once + # is fixed. + ./13/mangle-NIX_STORE-in-__FILE__.patch + ]; "15" = [ # Do not try looking for binaries and libraries in /lib and /usr/lib ./13/no-sys-dirs-riscv.patch diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix index 521d129bbb37..ca6b2c91033d 100644 --- a/pkgs/development/compilers/gcc/versions.nix +++ b/pkgs/development/compilers/gcc/versions.nix @@ -1,5 +1,6 @@ let majorMinorToVersionMap = { + "16" = "16.1.0"; "15" = "15.2.0"; "14" = "14.3.0"; "13" = "13.4.0"; @@ -13,6 +14,7 @@ let { # 3 digits: releases (14.2.0) # 4 digits: snapshots (14.2.1.20250322) + "16.1.0" = "sha256-UO+02Uwzl6/zsNYaWr10i03THZ0/Kre+BbFx02pRD3k="; "15.2.0" = "sha256-Q4/ZloJrDIJIWinaA6ctcdbjVBqD7HAt9Ccfb+Al0k4="; "14.3.0" = "sha256-4Nx3KXYlYxrI5Q+pL//v6Jmk63AlktpcMu8E4ik6yjo="; "13.4.0" = "sha256-nEzm27BAVo/cVFWIrAPFy8lajb8MeqSQFwhDr7WcqPU="; diff --git a/pkgs/top-level/ada-packages.nix b/pkgs/top-level/ada-packages.nix index 729e7045154c..1a4cf5f751c1 100644 --- a/pkgs/top-level/ada-packages.nix +++ b/pkgs/top-level/ada-packages.nix @@ -21,9 +21,14 @@ makeScopeWithSplicing' { xmlada = self.callPackage ../development/ada-modules/xmlada { }; - gnatprove = self.callPackage ../development/ada-modules/gnatprove { - ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_14; - }; + gnatprove = + # They haven't released a version of gnatprove for gnat16 yet + if lib.versionOlder gnat.version "16" then + self.callPackage ../development/ada-modules/gnatprove { + ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_14; + } + else + null; gnatcoll-core = self.callPackage ../development/ada-modules/gnatcoll/core.nix { }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 680b8cec248f..6e50c31a5bdb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3731,6 +3731,7 @@ with pkgs; gcc13Stdenv = overrideCC gccStdenv buildPackages.gcc13; gcc14Stdenv = overrideCC gccStdenv buildPackages.gcc14; gcc15Stdenv = overrideCC gccStdenv buildPackages.gcc15; + gcc16Stdenv = overrideCC gccStdenv buildPackages.gcc16; # This is not intended for use in nixpkgs but for providing a faster-running # compiler to nixpkgs users by building gcc with reproducibility-breaking @@ -3833,9 +3834,10 @@ with pkgs; gcc13 gcc14 gcc15 + gcc16 ; - gcc_latest = gcc15; + gcc_latest = gcc16; libgccjit = gcc.cc.override { name = "libgccjit"; @@ -3933,6 +3935,34 @@ with pkgs; } ); + gnat16 = wrapCC ( + gcc16.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-bootstrap14 + else + buildPackages.gnat16; + stdenv = + if + stdenv.hostPlatform == stdenv.targetPlatform + && stdenv.buildPlatform == stdenv.hostPlatform + && stdenv.buildPlatform.isDarwin + && stdenv.buildPlatform.isx86_64 + then + overrideCC stdenv gnat-bootstrap14 + else + stdenv; + } + ); + gnat-bootstrap = gnat-bootstrap13; gnat-bootstrap13 = wrapCCWith ( { @@ -3954,6 +3984,7 @@ with pkgs; gnat13Packages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat13; }); gnat14Packages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat14; }); gnat15Packages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat15; }); + gnat16Packages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat16; }); gnatPackages = gnat13Packages; inherit (gnatPackages) @@ -4021,6 +4052,21 @@ with pkgs; } ); + gccgo16 = wrapCC ( + gcc16.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-mcode = ghdl.override { backend = "mcode"; }; ghdl-gcc = ghdl.override { backend = "gcc"; };