Skip to content

Commit

Permalink
{gcc7{,Stdenv},gfortran7}: drop
Browse files Browse the repository at this point in the history
Release branch from 7½ years ago, no update in 5 years, unsupported
upstream, and unused in tree.
  • Loading branch information
emilazy committed Nov 20, 2024
1 parent 97120bd commit 30d3618
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 703 deletions.
10 changes: 0 additions & 10 deletions pkgs/by-name/gf/gfortran7/package.nix

This file was deleted.

2 changes: 1 addition & 1 deletion pkgs/development/compilers/gcc/all.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
isl = if stdenv.hostPlatform.isDarwin then null
else if atLeast "9" then isl_0_20
else /* atLeast "7" */ isl_0_17;
else /* atLeast "8" */ isl_0_17;
} // lib.optionalAttrs (!(atLeast "9")) {
# gcc 10 is too strict to cross compile gcc <= 8
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc9Stdenv else stdenv;
Expand Down
21 changes: 5 additions & 16 deletions pkgs/development/compilers/gcc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ let
atLeast11 = versionAtLeast version "11";
atLeast10 = versionAtLeast version "10";
atLeast9 = versionAtLeast version "9";
atLeast8 = versionAtLeast version "8";
is14 = majorVersion == "14";
is13 = majorVersion == "13";
is12 = majorVersion == "12";
is11 = majorVersion == "11";
is10 = majorVersion == "10";
is9 = majorVersion == "9";
is8 = majorVersion == "8";
is7 = majorVersion == "7";

disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler);

Expand Down Expand Up @@ -166,7 +164,7 @@ assert stdenv.buildPlatform.isDarwin -> gnused != null;

# The go frontend is written in c++
assert langGo -> langCC;
assert (!is7 && !is8) -> (langAda -> gnat-bootstrap != null);
assert (!is8) -> (langAda -> gnat-bootstrap != null);

# TODO: fixup D bootstapping, probably by using gdc11 (and maybe other changes).
# error: GDC is required to build d
Expand Down Expand Up @@ -261,9 +259,7 @@ pipe ((callFile ./common/builder.nix {}) ({

configurePlatforms = [ "build" "host" "target" ];

configureFlags = (callFile ./common/configure-flags.nix { })
++ optional (is7 && targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419"
++ optional (is7 && targetPlatform.isNetBSD) "--disable-libcilkrts";
configureFlags = callFile ./common/configure-flags.nix { };

inherit targetConfig;

Expand Down Expand Up @@ -319,11 +315,7 @@ pipe ((callFile ./common/builder.nix {}) ({
EXTRA_FLAGS_FOR_TARGET
EXTRA_LDFLAGS_FOR_TARGET
;
} // optionalAttrs is7 {
NIX_CFLAGS_COMPILE = optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument"
# Downgrade register storage class specifier errors to warnings when building a cross compiler from a clang stdenv.
+ optionalString (stdenv.cc.isClang && targetPlatform != hostPlatform) " -Wno-register";
} // optionalAttrs (!is7 && !atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) {
} // optionalAttrs (!atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) {
NIX_CFLAGS_COMPILE = "-Wno-register";
});

Expand All @@ -332,13 +324,12 @@ pipe ((callFile ./common/builder.nix {}) ({
isGNU = true;
hardeningUnsupportedFlags =
optional (
(targetPlatform.isAarch64 && !atLeast9) || !atLeast8
targetPlatform.isAarch64 && !atLeast9
) "stackclashprotection"
++ optional (!atLeast11) "zerocallusedregs"
++ optionals (!atLeast12) [ "fortify3" "trivialautovarinit" ]
++ optional (!(
atLeast8
&& targetPlatform.isLinux
targetPlatform.isLinux
&& targetPlatform.isx86_64
&& targetPlatform.libc == "glibc"
)) "shadowstack"
Expand Down Expand Up @@ -371,8 +362,6 @@ pipe ((callFile ./common/builder.nix {}) ({
preBuild = ''
makeFlagsArray+=('STRIP=${getBin cctools}/bin/${stdenv.cc.targetPrefix}strip')
'';
} // optionalAttrs (!atLeast8) {
doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
} // optionalAttrs enableMultilib {
dontMoveLib64 = true;
}
Expand Down

This file was deleted.

Loading

0 comments on commit 30d3618

Please sign in to comment.