Use libatomic for 64-bit operations
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Sat, 24 Sep 2022 07:06:11 +0000 (08:06 +0100)
committerIlias Tsitsimpis <iliastsi@debian.org>
Sat, 24 Sep 2022 07:06:11 +0000 (08:06 +0100)
commita4e7e95be9d8722a93edbce9f0d6f46473a19622
tree4e8c248764013e566b4ce6141a36a4f3e85fee1b
parent64abdb88c0ac7810198ebb9bb9a28561e0a9cf46
Use libatomic for 64-bit operations

The rts package uses GCC's __atomic built-in functions on 64-bit values. This
is not supported on some 32bit platforms (e.g., mipsel) resulting in the
following compilation error:
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_load_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_store_8'
   rts/dist/build/libHSrts_thr-ghc8.10.7.so: error: undefined reference to '__atomic_fetch_add_8'

 Fix this by linking against libatomic.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20549
Forwarded: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6820

Gbp-Pq: Name latomic-64bit
configure.ac