Re: Explicitly linking -latomic
Hi Joachim
On Sun, Feb 20, 2022 at 7:24 PM Joachim Reichel
<joachim.reichel@posteo.de> 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
>
Reply to: