Skip to content

Commit 827008f

Browse files
committed
Merge remote-tracking branch 'origin/master' into armv7a
2 parents 134d69a + 618d266 commit 827008f

6 files changed

+182
-26
lines changed

flake.lock

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/call-cabal-project-to-nix.nix

+11-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{ pkgs, runCommand, cacert, index-state-hashes, haskellLib }:
1+
{ pkgs, cacert, index-state-hashes, haskellLib }:
22
{ name ? src.name or null # optional name for better error messages
33
, src
44
, materialized-dir ? ../materialized
@@ -14,7 +14,6 @@
1414
, cabalProjectFreeze ? null
1515
, caller ? "callCabalProjectToNix" # Name of the calling function for better warning messages
1616
, compilerSelection ? p: p.haskell-nix.compiler
17-
, ghc ? null # Deprecated in favour of `compiler-nix-name`
1817
, ghcOverride ? null # Used when we need to set ghc explicitly during bootstrapping
1918
, configureArgs ? "" # Extra arguments to pass to `cabal v2-configure`.
2019
# `--enable-tests --enable-benchmarks` are included by default.
@@ -74,29 +73,22 @@ let
7473
nix-tools = if args.nix-tools or null != null
7574
then args.nix-tools
7675
else evalPackages.haskell-nix.nix-tools-unchecked;
77-
forName = pkgs.lib.optionalString (name != null) (" for " + name);
76+
7877
nameAndSuffix = suffix: if name == null then suffix else name + "-" + suffix;
7978

8079
ghc' =
8180
if ghcOverride != null
8281
then ghcOverride
8382
else
84-
if ghc != null
85-
then __trace ("WARNING: A `ghc` argument was passed" + forName
86-
+ " this has been deprecated in favour of `compiler-nix-name`. "
87-
+ "Using `ghc` will break cross compilation setups, as haskell.nix cannot "
88-
+ "pick the correct `ghc` package from the respective buildPackages. "
89-
+ "For example, use `compiler-nix-name = \"ghc865\";` for GHC 8.6.5.") ghc
90-
else
91-
# Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
92-
# call to this file. And thus `pkgs` here is the proper `buildPackages`
93-
# set and we do not need, nor should pick the compiler from another level
94-
# of `buildPackages`, lest we want to get confusing errors about the Win32
95-
# package.
96-
#
97-
# > The option `packages.Win32.package.identifier.name' is used but not defined.
98-
#
99-
(compilerSelection pkgs)."${compiler-nix-name}";
83+
# Do note that `pkgs = final.buildPackages` in the `overlays/haskell.nix`
84+
# call to this file. And thus `pkgs` here is the proper `buildPackages`
85+
# set and we do not need, nor should pick the compiler from another level
86+
# of `buildPackages`, lest we want to get confusing errors about the Win32
87+
# package.
88+
#
89+
# > The option `packages.Win32.package.identifier.name' is used but not defined.
90+
#
91+
(compilerSelection pkgs)."${compiler-nix-name}";
10092

10193
in let
10294
ghc = if ghc' ? latestVersion

overlays/bootstrap.nix

+3
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ in {
297297

298298
# Fix issue loading windows dll using `.dll.a` file
299299
++ onWindows (fromUntil "9.4" "9.14" ./patches/ghc/ghc-9.10-windows-dll-dependent-symbol-type-fix.patch)
300+
301+
# See https://gitlab.haskell.org/ghc/ghc/-/merge_requests/13709
302+
++ fromUntil "9.8.4" "9.8.5" ./patches/ghc/ghc-9.8.4-remove-unused-containers-h-include13709.diff
300303
;
301304
in ({
302305
ghc8107 = traceWarnOld "8.10" (final.callPackage ../compiler/ghc {

overlays/haskell.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ final: prev: {
600600
index-state-hashes = import indexStateHashesPath;
601601
inherit (final.buildPackages.haskell-nix) haskellLib;
602602
pkgs = final.buildPackages.pkgs;
603-
inherit (final.buildPackages.pkgs) runCommand cacert;
603+
inherit (final.buildPackages.pkgs) cacert;
604604
};
605605

606606
# Loads a plan and filters the package directories using cleanSourceWith
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
diff --git a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
2+
index 6d97bda61c3037cecbe5f7fad42115927aa1a787..90b52076f37089e9bce8c1a55d49f757a6d178ff 100755
3+
--- a/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
4+
+++ b/.gitlab/rel_eng/mk-ghcup-metadata/mk_ghcup_metadata.py
5+
@@ -36,6 +36,7 @@ import os
6+
import yaml
7+
import gitlab
8+
from urllib.request import urlopen
9+
+from urllib.parse import urlparse
10+
import hashlib
11+
import sys
12+
import json
13+
@@ -80,7 +81,7 @@ source_artifact = Artifact('source-tarball'
14+
test_artifact = Artifact('source-tarball'
15+
, 'ghc-{version}-testsuite.tar.xz'
16+
, 'ghc-{version}-testsuite.tar.xz'
17+
- , 'ghc-{version}' )
18+
+ , 'ghc-{version}/testsuite' )
19+
20+
def debian(arch, n):
21+
return linux_platform(arch, "{arch}-linux-deb{n}".format(arch=arch, n=n))
22+
@@ -156,13 +157,18 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
23+
eprint(f"Bindist URL: {url}")
24+
eprint(f"Download URL: {final_url}")
25+
26+
- #Download and hash from the release pipeline, this must not change anyway during upload.
27+
+ # Download and hash from the release pipeline, this must not change anyway during upload.
28+
h = download_and_hash(url)
29+
30+
res = { "dlUri": final_url
31+
, "dlSubdir": artifact.subdir.format(version=version)
32+
- , "dlOutput": artifact.output_name.format(version=version)
33+
, "dlHash" : h }
34+
+
35+
+ # Only add dlOutput if it is inconsistent with the filename inferred from the URL
36+
+ output = artifact.output_name.format(version=version)
37+
+ if Path(urlparse(final_url).path).name != output:
38+
+ res["dlOutput"] = output
39+
+
40+
eprint(res)
41+
return res
42+
43+
diff --git a/compiler/GHC/Data/Word64Map.hs b/compiler/GHC/Data/Word64Map.hs
44+
index 3893313b5e9e79748f7595ecc1cb03c6536fa54f..b5034ca9f528d77c5571f4bd771edc5e6184d8c5 100644
45+
--- a/compiler/GHC/Data/Word64Map.hs
46+
+++ b/compiler/GHC/Data/Word64Map.hs
47+
@@ -8,7 +8,6 @@
48+
{-# LANGUAGE MonoLocalBinds #-}
49+
#endif
50+
51+
-#include "containers.h"
52+
53+
-----------------------------------------------------------------------------
54+
-- |
55+
diff --git a/compiler/GHC/Data/Word64Map/Internal.hs b/compiler/GHC/Data/Word64Map/Internal.hs
56+
index 6e60b7f5464aba8f4971ab876ccc698c2415b997..9dd92fb9efdd4b9f402cc595ca1e326bd60803dd 100644
57+
--- a/compiler/GHC/Data/Word64Map/Internal.hs
58+
+++ b/compiler/GHC/Data/Word64Map/Internal.hs
59+
@@ -14,7 +14,6 @@
60+
{-# OPTIONS_HADDOCK not-home #-}
61+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
62+
63+
-#include "containers.h"
64+
65+
-----------------------------------------------------------------------------
66+
-- |
67+
diff --git a/compiler/GHC/Data/Word64Map/Lazy.hs b/compiler/GHC/Data/Word64Map/Lazy.hs
68+
index 0df84842e2a7ce2c6aacb91c404b8a8f3f5c512e..0c09f62937f4115f50cced65f0ba3c35090c2f7b 100644
69+
--- a/compiler/GHC/Data/Word64Map/Lazy.hs
70+
+++ b/compiler/GHC/Data/Word64Map/Lazy.hs
71+
@@ -3,7 +3,6 @@
72+
{-# LANGUAGE Safe #-}
73+
#endif
74+
75+
-#include "containers.h"
76+
77+
-----------------------------------------------------------------------------
78+
-- |
79+
diff --git a/compiler/GHC/Data/Word64Map/Strict.hs b/compiler/GHC/Data/Word64Map/Strict.hs
80+
index 4de68d7f7c39560fffd7c5935042446311054574..ab7c1471fba741ab070f3ee47a0e13ccd7b615d1 100644
81+
--- a/compiler/GHC/Data/Word64Map/Strict.hs
82+
+++ b/compiler/GHC/Data/Word64Map/Strict.hs
83+
@@ -4,8 +4,6 @@
84+
{-# LANGUAGE Trustworthy #-}
85+
#endif
86+
87+
-#include "containers.h"
88+
-
89+
-----------------------------------------------------------------------------
90+
-- |
91+
-- Module : Data.Word64Map.Strict
92+
diff --git a/compiler/GHC/Data/Word64Map/Strict/Internal.hs b/compiler/GHC/Data/Word64Map/Strict/Internal.hs
93+
index 1605565c9fd7a527fac61dbf162ce0a805f4f920..d998e6b6a9778e4aa3750d01b8b38a7a3eb6f104 100644
94+
--- a/compiler/GHC/Data/Word64Map/Strict/Internal.hs
95+
+++ b/compiler/GHC/Data/Word64Map/Strict/Internal.hs
96+
@@ -4,8 +4,6 @@
97+
98+
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}
99+
100+
-#include "containers.h"
101+
-
102+
-----------------------------------------------------------------------------
103+
-- |
104+
-- Module : Data.Word64Map.Strict.Internal
105+
diff --git a/compiler/GHC/Data/Word64Set.hs b/compiler/GHC/Data/Word64Set.hs
106+
index 81cfcbd4efbab00fc203a5da905c0c0ccd9abb11..3c5c047d948e339de596d0fc729ae0534a229b7a 100644
107+
--- a/compiler/GHC/Data/Word64Set.hs
108+
+++ b/compiler/GHC/Data/Word64Set.hs
109+
@@ -3,8 +3,6 @@
110+
{-# LANGUAGE Safe #-}
111+
#endif
112+
113+
-#include "containers.h"
114+
-
115+
-----------------------------------------------------------------------------
116+
-- |
117+
-- Module : Data.Word64Set
118+
diff --git a/compiler/GHC/Data/Word64Set/Internal.hs b/compiler/GHC/Data/Word64Set/Internal.hs
119+
index b2df095adfb1f363ed0fdfebc1516c5b699b8106..569c312840a4bd8cadefb05a0e29210eef75d2c5 100644
120+
--- a/compiler/GHC/Data/Word64Set/Internal.hs
121+
+++ b/compiler/GHC/Data/Word64Set/Internal.hs
122+
@@ -12,8 +12,6 @@
123+
124+
{-# OPTIONS_HADDOCK not-home #-}
125+
126+
-#include "containers.h"
127+
-
128+
-----------------------------------------------------------------------------
129+
-- |
130+
-- Module : Data.Word64Set.Internal
131+
diff --git a/compiler/GHC/Utils/Containers/Internal/BitUtil.hs b/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
132+
index b7484cfc2e07b00b717e64f507aed0779c39f649..3d938b64e434ccdd4de7fbb0aa6c1651d911ee27 100644
133+
--- a/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
134+
+++ b/compiler/GHC/Utils/Containers/Internal/BitUtil.hs
135+
@@ -6,8 +6,6 @@
136+
{-# LANGUAGE Safe #-}
137+
#endif
138+
139+
-#include "containers.h"
140+
-
141+
-----------------------------------------------------------------------------
142+
-- |
143+
-- Module : Utils.Containers.Internal.BitUtil
144+
diff --git a/compiler/GHC/Utils/Containers/Internal/StrictPair.hs b/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
145+
index 65d3780ef071f2b9fc2f4b3ff5502314f6426abd..9a2cf89ca20588c7ecd919072d328673f7888828 100644
146+
--- a/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
147+
+++ b/compiler/GHC/Utils/Containers/Internal/StrictPair.hs
148+
@@ -3,8 +3,6 @@
149+
{-# LANGUAGE Safe #-}
150+
#endif
151+
152+
-#include "containers.h"
153+
-
154+
-- | A strict pair
155+
156+
module GHC.Utils.Containers.Internal.StrictPair (StrictPair(..), toPair) where

test/th-dlls/default.nix

+5
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ in recurseIntoAttrs {
2222
meta.disabled = stdenv.hostPlatform.isGhcjs
2323
# On aarch64 this test also breaks form musl builds (including cross compiles on x86_64-linux)
2424
|| (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl)
25+
# On for aarch64 cross compile on GHC 9.8.4 this test is fails sometimes for non profiled builds
26+
# (and always for the profiled builds).
27+
# This may be related to the memory allocation changes made in 9.8.4 that
28+
# replace the pool allocator patches we used in earlier versions.
29+
|| (compiler-nix-name == "ghc984" && stdenv.buildPlatform.isx86_64 && stdenv.hostPlatform.isAarch64)
2530
# Failed to lookup symbol: __aarch64_swp8_acq_rel
2631
|| (builtins.elem compiler-nix-name ["ghc947" "ghc948"] && haskellLib.isCrossHost && stdenv.hostPlatform.isAarch64)
2732
# We have been unable to get windows cross compilation of th-orphans to work for GHC 8.10 using the latest nixpkgs

0 commit comments

Comments
 (0)