Skip to content

Commit a6bec2e

Browse files
authored
Use GMP by default (#1963)
Also fixes the `enableNativeBignum` flag for GHC 9.4 and 9.6.
1 parent 557b044 commit a6bec2e

File tree

101 files changed

+23846
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+23846
-126
lines changed

compiler/ghc/default.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ let
242242
then ../../materialized/ghc8107/hadrian-ghc94
243243
else ../../materialized/ghc8107/hadrian-ghc96;
244244
modules = [{
245-
# Apply the patches in a way that does not require using somethin
245+
# Apply the patches in a way that does not require using something
246246
# like `srcOnly`. The problem with `pkgs.srcOnly` was that it had to run
247247
# on a platform at eval time.
248248
packages.hadrian.prePatch = ''
@@ -260,7 +260,13 @@ let
260260
cabalProjectLocal = null;
261261
cabalProjectFreeze = null;
262262
src = haskell-nix.haskellLib.cleanSourceWith {
263-
inherit src;
263+
src = {
264+
outPath = buildPackages.srcOnly {
265+
name = "hadrian";
266+
inherit src;
267+
};
268+
filterPath = { path, ... }: path;
269+
};
264270
subDir = "hadrian";
265271
};
266272
};
@@ -274,7 +280,8 @@ let
274280
+ lib.optionalString (!enableShared) "+no_dynamic_ghc"
275281
+ lib.optionalString useLLVM "+llvm"
276282
+ lib.optionalString enableDWARF "+debug_info"
277-
+ lib.optionalString targetPlatform.isGhcjs "+native_bignum+no_profiled_libs"
283+
+ lib.optionalString (enableNativeBignum || targetPlatform.isGhcjs) "+native_bignum"
284+
+ lib.optionalString targetPlatform.isGhcjs "+no_profiled_libs"
278285
} --docs=no-sphinx -j --verbose"
279286
# This is needed to prevent $GCC from emitting out of line atomics.
280287
# Those would then result in __aarch64_ldadd1_sync and others being referenced, which
@@ -317,7 +324,7 @@ let
317324
# Same goes for strip.
318325
strip =
319326
# TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold"
320-
if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin
327+
if stdenv.targetPlatform.isAarch64
321328
then targetCC.bintools
322329
else targetCC.bintools.bintools;
323330
};

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.2-x86_64-linux/ghc-pkg/dump-global

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.0.2-x86_64-linux/ghc/info

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.2.7-x86_64-linux/ghc-pkg/dump-global

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-gnu-aarch64-unknown-linux-gnu-ghc-9.6.1-x86_64-linux/ghc/info

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-musl-aarch64-unknown-linux-musl-ghc-9.2.7-aarch64-linux/ghc-pkg/dump-global

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/aarch64-unknown-linux-musl-aarch64-unknown-linux-musl-ghc-9.2.7-x86_64-linux/ghc-pkg/dump-global

Lines changed: 12 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/ghc-8.10.7-aarch64-darwin/ghc/info

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/ghc-8.10.7-x86_64-darwin/ghc/info

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

materialized/dummy-ghc/ghc-9.0.2-aarch64-darwin/ghc-pkg/dump-global

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)