Re: Explicitly linking -latomic

Mathieu Malaterre <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <CA+7wUswm8EK4oKW-ufOLDPRCXFz4nRdxr3yBx=z3nhThV4O+Dg@mail.gmail.com>
Hi Joachim

On Sun, Feb 20, 2022 at 7:24 PM Joachim Reichel
<[email protected]> wrote:
>
> Dear mips porters,
>
> I would like to get your input on bug #1005696. Is every C++ program using
> <atomic> supposed to add architecture-specific code to its build system to link
> with -latomic on mipsel?

Yes !

 (Which apparently is not necessary on other
> architectures.)

If you are unlucky, you'll need to tweak armel, mispel, powerpc and riscv64.

> Or is this some implementation detail that the compiler/linker
> should take care of automatically?

The issue will not be fixed at cmake level, and fixing it at the spec
level of gcc has proved to be difficult:

* https://gitlab.kitware.com/cmake/cmake/-/issues/23021

Basically you'll need to maintain your own libatomic patch...

> Best regards,
>    Joachim
>
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.