From ef6ca0f431fe3830c25cb2d185367245c1cce894 Mon Sep 17 00:00:00 2001 From: Le Tuan Date: Wed, 14 Oct 2020 14:57:45 +0200 Subject: [PATCH] fix: ignore atomic primops on ARM architectures (GHC 8.8.3) (#857) Fixes the #441 issue with GHC 8.8.3 (fix that was already applied to GHC 8.6.5 with PR #480). Testing environment: - GHC 8.8.3 (cross-compiler) - NixOS 20.03 - Building host: x86_64 - Target host: armv6l Without this PR, the symbol `__sync_val_compare_and_swap_8` was not found by `remote-iserv` as described in #441 but this time with GHC 8.8.3. The 8.6.5 patch also works for 8.8.3. Perhaps it would be preferable to apply this patch to a range of GHC versions rather than specific versions, but I have only tested it and verified that it works properly on those specific versions. I have not submitted this patch to the GHC GitLab as I haven't encountered any problem building a cross-compiling version of GHC from there. --- overlays/bootstrap.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlays/bootstrap.nix b/overlays/bootstrap.nix index 69aa40e217..a6cc94e746 100644 --- a/overlays/bootstrap.nix +++ b/overlays/bootstrap.nix @@ -117,7 +117,7 @@ in { ++ final.lib.optional (version == "8.6.3") ./patches/ghc/ghc-8.6.3-reinstallable-lib-ghc.patch ++ final.lib.optional (version == "8.6.4") ./patches/ghc/ghc-8.6.4-reinstallable-lib-ghc.patch ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-reinstallable-lib-ghc.patch - ++ final.lib.optional (version == "8.6.5") ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch + ++ fromUntil "8.6.5" "8.9" ./patches/ghc/ghc-8.6.5-atomic-arm-arch.patch ++ final.lib.optional (version == "8.6.5") ./patches/ghc/MR3214-writable-rel-ro-data.patch ++ final.lib.optional (version == "8.8.1") ./patches/ghc/ghc-8.8.1-reinstallable-lib-ghc.patch ++ fromUntil "8.8.2" "8.9" ./patches/ghc/ghc-8.8.2-reinstallable-lib-ghc.patch