diff --git a/bafe87d871399b58ce4a50592b980c990a3eac39.patch b/bafe87d871399b58ce4a50592b980c990a3eac39.patch new file mode 100644 index 0000000..d90f3ef --- /dev/null +++ b/bafe87d871399b58ce4a50592b980c990a3eac39.patch @@ -0,0 +1,25 @@ +From bafe87d871399b58ce4a50592b980c990a3eac39 Mon Sep 17 00:00:00 2001 +From: Bodigrim +Date: Thu, 9 May 2024 01:02:44 +0100 +Subject: [PATCH] Fix compilation on big-endian arches + +--- + System/OsString/Data/ByteString/Short/Internal.hs | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/System/OsString/Data/ByteString/Short/Internal.hs b/System/OsString/Data/ByteString/Short/Internal.hs +index fedc199..f7ddcd8 100644 +--- a/System/OsString/Data/ByteString/Short/Internal.hs ++++ b/System/OsString/Data/ByteString/Short/Internal.hs +@@ -311,7 +311,11 @@ word16ToLE#, word16FromLE# :: Word16# -> Word16# + word16ToLE#, word16FromLE# :: Word# -> Word# + #endif + #ifdef WORDS_BIGENDIAN ++#if MIN_VERSION_base(4,16,0) ++word16ToLE# w = wordToWord16# (byteSwap16# (word16ToWord# w)) ++#else + word16ToLE# = byteSwap16# ++#endif + #else + word16ToLE# w# = w# + #endif diff --git a/ghc9.10.spec b/ghc9.10.spec index 82ea7ee..cf43eec 100644 --- a/ghc9.10.spec +++ b/ghc9.10.spec @@ -107,6 +107,9 @@ Patch40: cabal-add-riscv64.patch # Upstream in >= 9.9. Patch41: https://gitlab.haskell.org/ghc/ghc/-/commit/dd38aca95ac25adc9888083669b32ff551151259.patch +# libraries +Patch100: https://github.com/haskell/os-string/commit/bafe87d871399b58ce4a50592b980c990a3eac39.patch + # https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms # fedora ghc has been bootstrapped on @@ -433,6 +436,11 @@ rm libffi-tarballs/libffi-*.tar.gz %patch -P41 -p1 -b .orig %endif +( +cd libraries/os-string +%patch -P100 -p1 -b .orig +) + # https://github.com/haskell/directory/pull/184 rm libraries/directory/directory.buildinfo