Skip to content

Commit

Permalink
Add initial support for GCC 14
Browse files Browse the repository at this point in the history
  • Loading branch information
silvanshade committed Apr 12, 2024
1 parent f173d08 commit 5cba57c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/common/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ in
]
++ optionals (perl != null) [ perl ]
++ optionals javaAwtGtk [ pkg-config ]
++ optionals (with stdenv.targetPlatform; isVc4 || isRedox && flex != null) [ flex ]
++ optionals (lib.versionAtLeast version "14" || (with stdenv.targetPlatform; isVc4 || isRedox && flex != null)) [ flex ]
++ optionals langAda [ gnat-bootstrap ]
# The builder relies on GNU sed (for instance, Darwin's `sed' fails with
# "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
Expand Down
4 changes: 4 additions & 0 deletions pkgs/development/compilers/gcc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ let
version = versions.fromMajorMinor majorMinorVersion;

majorVersion = lib.versions.major version;
atLeast14 = lib.versionAtLeast version "14";
atLeast13 = lib.versionAtLeast version "13";
atLeast12 = lib.versionAtLeast version "12";
atLeast11 = lib.versionAtLeast version "11";
Expand All @@ -61,6 +62,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";
Expand Down Expand Up @@ -221,6 +223,8 @@ let inherit version;
url = "https://www.antlr.org/download/antlr-4.4-complete.jar";
sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
};
} // lib.optionalAttrs atLeast14 {
inherit flex;
});

in
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/gcc/patches/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,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 ];
Expand Down

0 comments on commit 5cba57c

Please sign in to comment.