Re: Bug#1052144: ghc: Needs to link against libatomic on at least m68k

Ilias Tsitsimpis <[email protected]>
Newsgroups gmane.linux.debian.ports.68k
Message-ID <[email protected]>
Hi Adrian,

On Sat, Oct 14, 2023 at 11:35AM, John Paul Adrian Glaubitz wrote:
> Attaching an updated version of the patch which applies against the 9.4.7-1
> version of the ghc package. Would be nice if it could be included for the
> next upload.

Thanks for the reminder, I will include this in the next upload.

As a side note, I believe the attached patch is wrong, it changes the
semantics of the functions. Notice that __sync_val_compare_and_swap()
returns the initial value of the variable x, whereas
__atomic_compare_exchange() returns true/false, depending on whether the
operation succeeded. The correct patch is here [1].

Could this be the reason why your cross-compiler for m68k seg-faults?

[1] https://gitlab.haskell.org/ghc/ghc/-/commit/f8fa1d08d7cbfef508bab355bda80f495e928f98

Best,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.