Use libatomic for 64-bit operations
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)
committerScott Talbert <swt@techie.net>
Mon, 31 Jul 2023 22:47:27 +0000 (23:47 +0100)
commit2c1f52bf356d967364d50ce5417b8c3f4e2849dd
tree90c1b599276bbe28e655903a1cad4eb61602a80e
parent958fcd6a22eed6d1f180d53db59fe2766fdceee8
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