Skip to content

Commit

Permalink
Merge branch 'develop' into nixpkgs-21.05
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Jun 9, 2022
2 parents 51665aa + ac66356 commit cfdcc8c
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 10 deletions.
5 changes: 2 additions & 3 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ This project's release branch is `master`. This log is written from the perspect

## Unreleased

* Fix SIGBUS crashes on armv7a due unaligned writes ([!774](https://github.com/reflex-frp/reflex-platform/pull/774))
* Always use GHC 8.10.7, not GHC 8.10.4, for GHC 8.10.
Previously we were using mixed GHC 8.10 versions to avoid issues.

## Unreleased

* GHC 8.10 support is complete, with the remaining profiling builds
that worked for 8.6 (everything but GHCJS's) now also working for 8.10.

Expand All @@ -34,6 +32,7 @@ This project's release branch is `master`. This log is written from the perspect

Intentional bumps:

* all-cabal-hashes "Update from Hackage at 2022-01-20T19:38:07Z"
* dependent-sum-template to 0.1.1.0
* some to 1.0.2

Expand Down
4 changes: 2 additions & 2 deletions nixpkgs-overlays/all-cabal-hashes/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
self: _: {

all-cabal-hashes = self.fetchurl {
url = https://github.com/commercialhaskell/all-cabal-hashes/archive/5ea2bb9f4468a4043ed2d878fb6b8a3e70c7436f.tar.gz;
sha256 = "1pg9vfsdk18ga38vjwl848pxfs81xsgg9rjgd5yvrychczhwr452";
url = https://github.com/commercialhaskell/all-cabal-hashes/archive/02611fecba726dceab2ba02079ae0e6ed86efa4d.tar.gz;
sha256 = "1n0rizsylq4l3m81n7x339cc75p6vzg0jnz7qq4y8a3fkjqcfwb9";
};

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
diff --git a/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs b/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs
index fb52404..572b4b7 100644
--- a/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs
+++ b/libraries/bytestring/Data/ByteString/Builder/Prim/Internal.hs
@@ -198,7 +198,19 @@ liftFixedToBounded = toB

{-# INLINE CONLIKE storableToF #-}
storableToF :: forall a. Storable a => FixedPrim a
+-- Not all architectures are forgiving of unaligned accesses; whitelist ones
+-- which are known not to trap (either to the kernel for emulation, or crash).
+#if defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH) \
+ || ((defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) \
+ && defined(__ARM_FEATURE_UNALIGNED)) \
+ || defined(powerpc_HOST_ARCH) || defined(powerpc64_HOST_ARCH) \
+ || defined(powerpc64le_HOST_ARCH)
storableToF = FP (sizeOf (undefined :: a)) (\x op -> poke (castPtr op) x)
+#else
+storableToF = FP (sizeOf (undefined :: a)) $ \x op ->
+ if ptrToWordPtr op `mod` fromIntegral (alignment (undefined :: a)) == 0 then poke (castPtr op) x
+ else with x $ \tp -> copyBytes op (castPtr tp) (sizeOf (undefined :: a))
+#endif

{-
{-# INLINE CONLIKE liftIOF #-}
23 changes: 19 additions & 4 deletions nixpkgs-overlays/mobile-ghc/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
{ lib }:
self: super: {
let
versionWildcard = versionList: let
versionListInc = lib.init versionList ++ [ (lib.last versionList + 1) ];
bottom = lib.concatStringsSep "." (map toString versionList);
top = lib.concatStringsSep "." (map toString versionListInc);
in version: lib.versionOlder version top && lib.versionAtLeast version bottom;
in self: super: {
haskell = super.haskell // {
compiler = super.haskell.compiler // lib.mapAttrs (n: v: v.overrideAttrs (drv: {
patches = (drv.patches or []) ++ lib.optionals self.stdenv.targetPlatform.useAndroidPrebuilt [
./8.6.y/android-patches/force-relocation.patch
];
patches = let
isAndroid = self.stdenv.targetPlatform.useAndroidPrebuilt;
isGhc86x = versionWildcard [ 8 6 ] v.version;
in
(drv.patches or []) ++
lib.optionals isAndroid [
./8.6.y/android-patches/force-relocation.patch
] ++
lib.optionals (isAndroid && isGhc86x) [
./8.6.y/android-patches/strict-align.patch
];
})) { inherit (super.haskell.compiler) ghc8107 ghcSplices-8_10; };
};
}

6 changes: 5 additions & 1 deletion scripts/hack-on
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ elif [ -e "$REPO/github.json" ] ; then
JSON_FILE="$REPO/github.json"
GITHUB_OWNER="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).owner")")"
GITHUB_REPO="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).repo")")"
URL="git://github.com/$GITHUB_OWNER/$GITHUB_REPO"
URL="https://github.com/$GITHUB_OWNER/$GITHUB_REPO"
REV="$(eval "echo $(nix-instantiate $NIXOPTS --eval -E "(builtins.fromJSON (builtins.readFile $REPO/github.json)).rev")")"
fi

Expand All @@ -48,8 +48,12 @@ if [ -f "$REPO/thunk.nix" ] ; then
rm "$REPO/thunk.nix"
fi
rm "$JSON_FILE"

trap "echo 'Attempted to replace $REPO but encountered unexpected file(s). Please remove.'" ERR
rmdir "$REPO"

trap "echo 'Could not clone $REPO. This thunk may be in a bad state.'" ERR

git clone -n "$URL" "$REPO"
REMOTE_URL="$(git -C "$REPO" config --get remote.origin.url)"
FIXED_REMOTE_URL="$(echo "$REMOTE_URL" | sed 's_^git://github.com/[email protected]:_')"
Expand Down

0 comments on commit cfdcc8c

Please sign in to comment.