haskell.compiler.ghc928: drop

This commit is contained in:
Emily
2025-09-07 01:13:30 +01:00
parent c024327605
commit 3b7e7e362b
10 changed files with 25 additions and 187 deletions

View File

@@ -1305,7 +1305,7 @@ let
# Name of the compiler and package set you want to change. If you are using
# the default package set `haskellPackages`, you need to look up what version
# of GHC it currently uses (note that this is subject to change).
ghcName = "ghc92";
ghcName = "ghc910";
# Desired new setting
enableProfiling = true;

View File

@@ -26,7 +26,7 @@
- GHCJS 8.10, exposed via `haskell.compiler.ghcjs` and `haskell.compiler.ghcjs810`, has been removed. Downstream users should migrate their projects to the new JavaScript backend of GHC proper which can be used via `pkgsCross.ghcjs` from Nixpkgs. Haskell packaging code, like `haskellPackages.mkDerivation`, `ghcWithPackages` and `hoogleWithPackages`, also no longer supports GHCJS.
- GHC 8.6, 8.10, 9.0, and their package sets have been removed.
- GHC 8.6, 8.10, 9.0, 9.2, and their package sets have been removed.
- Support for bootstrapping native GHC compilers on 32bit ARM and littleendian 64bit PowerPC has been dropped.
The latter was probably broken anyway.

View File

@@ -267,9 +267,9 @@ rec {
mkPackageOption pkgs "GHC" {
default = [ "ghc" ];
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
=> { ...; default = pkgs.ghc; defaultText = literalExpression "pkgs.ghc"; description = "The GHC package to use."; example = literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])"; type = package; }
=> { ...; default = pkgs.ghc; defaultText = literalExpression "pkgs.ghc"; description = "The GHC package to use."; example = literalExpression "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])"; type = package; }
mkPackageOption pkgs [ "python3Packages" "pytorch" ] {
extraDescription = "This is an example and doesn't actually do anything.";

View File

@@ -152,7 +152,7 @@ lib.mkPackageOption pkgs "hello" { }
lib.mkPackageOption pkgs "GHC"
{
default = [ "ghc" ];
example = "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])";
}
# is like
lib.mkOption
@@ -160,7 +160,7 @@ lib.mkPackageOption pkgs "GHC"
type = lib.types.package;
default = pkgs.ghc;
defaultText = lib.literalExpression "pkgs.ghc";
example = lib.literalExpression "pkgs.haskell.packages.ghc92.ghc.withPackages (hkgs: [ hkgs.primes ])";
example = lib.literalExpression "pkgs.haskellPackages.ghc.withPackages (hkgs: [ hkgs.primes ])";
description = "The GHC package to use.";
}
```

View File

@@ -1,4 +0,0 @@
import ./common-make-native-bignum.nix {
version = "9.2.8";
sha256 = "sha256-XxPReGv0/RL0tF+qN6vttbs/NtXlj32lMH6L/oilZ6E=";
}

View File

@@ -309,12 +309,7 @@ stdenv.mkDerivation (
# package db. This fixes linking whenever stdenv and propagation won't
# quite pass the correct -L flags to the linker, e.g. when using GHC
# outside of stdenv/nixpkgs or build->build compilation in pkgsStatic.
(
if lib.versionAtLeast version "9.4" then
./ghc-9.4-rts-package-db-libnuma-dirs.patch
else
./ghc-8.10-9.2-rts-package-db-libnuma-dirs.patch
)
./ghc-9.4-rts-package-db-libnuma-dirs.patch
]
# Before GHC 9.6, GHC, when used to compile C sources (i.e. to drive the CC), would first
@@ -333,27 +328,20 @@ stdenv.mkDerivation (
#
# https://gitlab.haskell.org/ghc/ghc/-/issues/25608#note_622589
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6877
++ (
if lib.versionAtLeast version "9.4" then
[
# Need to use this patch so the next one applies, passes file location info to the cc phase
(fetchpatch {
name = "ghc-add-location-to-cc-phase.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/4a7256a75af2fc0318bef771a06949ffb3939d5a.patch";
hash = "sha256-DnTI+i1zMebeWvw75D59vMaEEBb2Nr9HusxTyhmdy2M=";
})
# Makes Cc phase directly generate object files instead of assembly
(fetchpatch {
name = "ghc-cc-directly-emit-object.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/96811ba491495b601ec7d6a32bef8563b0292109.patch";
hash = "sha256-G8u7/MK/tGOEN8Wxccxj/YIOP7mL2G9Co1WKdHXOo6I=";
})
]
else
[
# TODO(@sternenseemann): backport changes to GHC < 9.4 if possible
]
)
++ [
# Need to use this patch so the next one applies, passes file location info to the cc phase
(fetchpatch {
name = "ghc-add-location-to-cc-phase.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/4a7256a75af2fc0318bef771a06949ffb3939d5a.patch";
hash = "sha256-DnTI+i1zMebeWvw75D59vMaEEBb2Nr9HusxTyhmdy2M=";
})
# Makes Cc phase directly generate object files instead of assembly
(fetchpatch {
name = "ghc-cc-directly-emit-object.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/96811ba491495b601ec7d6a32bef8563b0292109.patch";
hash = "sha256-G8u7/MK/tGOEN8Wxccxj/YIOP7mL2G9Co1WKdHXOo6I=";
})
]
++ [
# Don't generate code that doesn't compile when --enable-relocatable is passed to Setup.hs
@@ -366,22 +354,12 @@ stdenv.mkDerivation (
})
]
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
++ lib.optionals (lib.versionOlder version "9.4") [
(fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/1482.patch";
sha256 = "sha256-8w8QUCsODaTvknCDGgTfFNZa8ZmvIKaKS+2ZJZ9foYk=";
extraPrefix = "utils/haddock/";
stripLen = 1;
})
]
# Fixes stack overrun in rts which crashes an process whenever
# freeHaskellFunPtr is called with nixpkgs' hardening flags.
# https://gitlab.haskell.org/ghc/ghc/-/issues/25485
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13599
# TODO: patch doesn't apply for < 9.4, but may still be necessary?
++ lib.optionals (lib.versionAtLeast version "9.4") [
++ [
(fetchpatch {
name = "ghc-rts-adjustor-fix-i386-stack-overrun.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/39bb6e583d64738db51441a556d499aa93a4fc4a.patch";
@@ -389,16 +367,6 @@ stdenv.mkDerivation (
})
]
++ lib.optionals (lib.versionOlder version "9.4.6") [
# Fix docs build with sphinx >= 6.0
# https://gitlab.haskell.org/ghc/ghc/-/issues/22766
(fetchpatch {
name = "ghc-docs-sphinx-6.0.patch";
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
]
++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
@@ -466,8 +434,6 @@ stdenv.mkDerivation (
export AR_STAGE0="$AR_FOR_BUILD"
echo -n "${buildMK}" > mk/build.mk
''
+ lib.optionalString (lib.versionAtLeast version "9.4") ''
sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
''
+ lib.optionalString (stdenv.hostPlatform.isLinux && hostPlatform.libc == "glibc") ''

View File

@@ -1,100 +0,0 @@
From 3d17e6fa39fb18d4300fbf2a0c4b9ddb4adf746b Mon Sep 17 00:00:00 2001
From: sterni <sternenseemann@systemli.org>
Date: Thu, 17 Jul 2025 21:21:29 +0200
Subject: [PATCH] rts: record libnuma include and lib dirs in package conf
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The --with-libnuma-libraries and --with-libnuma-includes flags were
originally introduced for hadrian in def486c90ef6f37d81d0d9c6df7544
and curiously never supported by the make build system — even though
the addition was made in the 9.0 series and even backported to the
8.10 series.
While the make build system knows when to link against libnuma, it won't
enforce its specific directories by adding them to rts.conf in the
package db. This commit implements this retroactively for the make build
system, modeled after how make does the same sort of thing for Libdw.
The Libdw logic also affects the bindist configure file in
distrib/configure.ac which isn't replicate since we don't need it.
---
mk/config.mk.in | 4 ++++
rts/ghc.mk | 8 ++++++++
rts/package.conf.in | 5 +++--
rts/rts.cabal.in | 1 +
4 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 35f6e2d087..d2b1329eb5 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -333,6 +333,10 @@ LibdwIncludeDir=@LibdwIncludeDir@
# rts/Libdw.c:set_initial_registers()
GhcRtsWithLibdw=$(strip $(if $(filter $(TargetArch_CPP),i386 x86_64 s390x),@UseLibdw@,NO))
+UseLibNuma=@UseLibNuma@
+LibNumaLibDir=@LibNumaLibDir@
+LibNumaIncludeDir=@LibNumaIncludeDir@
+
################################################################################
#
# Paths (see paths.mk)
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 9c535def5a..7782c4b768 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -576,6 +576,14 @@ rts_PACKAGE_CPP_OPTS += -DLIBDW_INCLUDE_DIR=
rts_PACKAGE_CPP_OPTS += -DLIBDW_LIB_DIR=
endif
+ifeq "$(UseLibNuma)" "YES"
+rts_PACKAGE_CPP_OPTS += -DLIBNUMA_INCLUDE_DIR=$(LibNumaIncludeDir)
+rts_PACKAGE_CPP_OPTS += -DLIBNUMA_LIB_DIR=$(LibNumaLibDir)
+else
+rts_PACKAGE_CPP_OPTS += -DLIBNUMA_INCLUDE_DIR=
+rts_PACKAGE_CPP_OPTS += -DLIBNUMA_LIB_DIR=
+endif
+
# -----------------------------------------------------------------------------
# dependencies
diff --git a/rts/package.conf.in b/rts/package.conf.in
index 9bdbf3659a..46f728b09a 100644
--- a/rts/package.conf.in
+++ b/rts/package.conf.in
@@ -18,9 +18,9 @@ hidden-modules:
import-dirs:
#if defined(INSTALLING)
-library-dirs: LIB_DIR"/rts" FFI_LIB_DIR LIBDW_LIB_DIR
+library-dirs: LIB_DIR"/rts" FFI_LIB_DIR LIBDW_LIB_DIR LIBNUMA_LIB_DIR
#else /* !INSTALLING */
-library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR
+library-dirs: TOP"/rts/dist/build" FFI_LIB_DIR LIBDW_LIB_DIR LIBNUMA_LIB_DIR
#endif
hs-libraries: "HSrts" FFI_LIB
@@ -76,6 +76,7 @@ include-dirs: TOP"/rts/dist/build"
FFI_INCLUDE_DIR
LIBDW_INCLUDE_DIR
TOP"/includes/dist-install/build"
+ LIBNUMA_INCLUDE_DIR
#endif
includes: Stg.h
diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in
index 0a06414d95..f71fb079ec 100644
--- a/rts/rts.cabal.in
+++ b/rts/rts.cabal.in
@@ -150,6 +150,7 @@ library
include-dirs: build ../includes includes
includes/dist-derivedconstants/header @FFIIncludeDir@
@LibdwIncludeDir@
+ @LibNumaIncludeDir@
includes: Stg.h
install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h
ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h
--
2.50.0

View File

@@ -86,18 +86,6 @@ in
llvmPackages = pkgs.llvmPackages_15;
};
ghc928 = callPackage ../development/compilers/ghc/9.2.8.nix {
bootPkgs = bb.packages.ghc902Binary;
inherit (buildPackages.python311Packages) sphinx; # a distutils issue with 3.12
python3 = buildPackages.python311; # so that we don't have two of them
# Need to use apple's patched xattr until
# https://github.com/xattr/xattr/issues/44 and
# https://github.com/xattr/xattr/issues/55 are solved.
inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12;
llvmPackages = pkgs.llvmPackages_12;
};
ghc92 = compiler.ghc928;
ghc948 = callPackage ../development/compilers/ghc/9.4.8.nix {
bootPkgs =
# Building with 9.2 is broken due to
@@ -249,6 +237,7 @@ in
// pkgs.lib.optionalAttrs config.allowAliases {
ghc810 = throw "'haskell.compiler.ghc810' has been removed."; # Added 2025-09-07
ghc90 = throw "'haskell.compiler.ghc90' has been removed."; # Added 2025-09-07
ghc92 = throw "'haskell.compiler.ghc92' has been removed."; # Added 2025-09-07
ghcjs = throw "'haskell.compiler.ghcjs' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06
ghcjs810 = throw "'haskell.compiler.ghcjs810' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06
integer-simple = throw "All GHC versions with integer-simple support have been removed."; # Added 2025-09-07
@@ -288,12 +277,6 @@ in
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.8.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc928 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc928;
ghc = bh.compiler.ghc928;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { };
};
ghc92 = packages.ghc928;
ghc948 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc948;
ghc = bh.compiler.ghc948;
@@ -362,6 +345,7 @@ in
// pkgs.lib.optionalAttrs config.allowAliases {
ghc810 = throw "'haskell.packages.ghc810' has been removed."; # Added 2025-09-07
ghc90 = throw "'haskell.packages.ghc90' has been removed."; # Added 2025-09-07
ghc92 = throw "'haskell.packages.ghc92' has been removed."; # Added 2025-09-07
ghcjs = throw "'haskell.packages.ghcjs' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06
ghcjs810 = throw "'haskell.packages.ghcjs810' has been removed. Please use 'pkgsCross.ghcjs' instead."; # Added 2025-09-06
integer-simple = throw "All GHC versions with integer-simple support have been removed."; # Added 2025-09-07

View File

@@ -63,7 +63,6 @@ let
# list of all compilers to test specific packages on
released = with compilerNames; [
ghc928
ghc948
ghc963
ghc967
@@ -547,7 +546,6 @@ let
# from the package sets. Due to (transitively) requiring recent versions
# of core packages, it is not always reasonable to get cabal-install to
# work with older compilers.
compilerNames.ghc928
compilerNames.ghc948
] released;
Cabal_3_10_3_0 = lib.subtractLists [
@@ -565,10 +563,7 @@ let
compilerNames.ghc9101
compilerNames.ghc9102
];
haskell-language-server = lib.subtractLists [
# Support ceased as of 2.10.0.0
compilerNames.ghc928
] released;
haskell-language-server = released;
hoogle = released;
hlint = lib.subtractLists [
compilerNames.ghc9101
@@ -663,9 +658,7 @@ let
];
};
constituents = accumulateDerivations [
jobs.pkgsMusl.haskell.compiler.ghc928
jobs.pkgsMusl.haskell.compiler.ghcHEAD
jobs.pkgsMusl.haskell.compiler.native-bignum.ghc928
jobs.pkgsMusl.haskell.compiler.native-bignum.ghcHEAD
];
};

View File

@@ -363,7 +363,6 @@ let
packages =
genAttrs
[
"ghc92"
"ghc94"
"ghc96"
"ghc98"