Use libatomic for 64-bit operations
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Tue, 21 Jun 2022 16:57:57 +0000 (17:57 +0100)
committerIlias Tsitsimpis <iliastsi@debian.org>
Tue, 21 Jun 2022 16:57:57 +0000 (17:57 +0100)
commit6ddafb1076c2eedbcc171d6d2097eae7b0baed5a
tree18e0d6aefa44d79dc983a62448f033c6dfdad355
parentdd76813c5b3bf0345511d32f76bc478f3a1f0d25
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