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

John Paul Adrian Glaubitz <[email protected]>
Newsgroups gmane.linux.debian.ports.68k
Message-ID <ffcc82c27aaa51fd2ddf9e3df37f90754a972e9f.camel@physik.fu-berlin.de>
Hello!

On Sat, 2023-10-14 at 16:37 +0200, John Paul Adrian Glaubitz wrote:
> Hi!
> 
> On Sat, 2023-10-14 at 17:33 +0300, Ilias Tsitsimpis wrote:
> > 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?
> 
> Hmm, good point. I will verify that. Thanks for pointing this out!

Cherry-picked the patches from 9.4.7 to fix the 32-bit unregisterised builds
plus the patch to use modern atomics now but the cross-compiled package still
crashes on m68k:

Setting up ghc (9.4.6-1+ports) ...
qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
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.