Skip to content

Commit f5a511f

Browse files
trommlertreeowl
authored andcommitted
Disable unboxed arrays on big-endian
Unboxed arrays are broken on big-endian architectures, see https://gitlab.haskell.org/ghc/ghc/-/issues/16998 for details. This patch makes the use of unboxed arrays conditional on little-endian architecture. Fixes #673
1 parent c3a4e78 commit f5a511f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

containers/include/containers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@
3535

3636
#ifdef __GLASGOW_HASKELL__
3737
# define USE_ST_MONAD 1
38+
#ifndef WORDS_BIGENDIAN
39+
/*
40+
* Unboxed arrays are broken on big-endian architectures.
41+
* See https://gitlab.haskell.org/ghc/ghc/-/issues/16998
42+
*/
3843
# define USE_UNBOXED_ARRAYS 1
3944
#endif
45+
#endif
4046

4147
#endif

0 commit comments

Comments
 (0)