On Fri, Sep 25, 2026 at 07:48:11PM +0300, Dimitar Dimitrov wrote:
> On Thu, Sep 24, 2026 at 09:27:20PM +0200, Jakub Jelinek wrote:
> > On Thu, Sep 24, 2026 at 09:18:48PM +0300, Dimitar Dimitrov wrote:
> > > Runtime target check is missing, which causes test fails on simple
> > > targets like pru-unknown-elf where long long atomics are not supported.
> >
> > What does it mean not supported?
> > The point is that even when it isn't supported by hw, it is supported
> > by libatomic. Or is libatomic not supported on pru-elf either?
>
> PRU is rather simple and has no instructions for atomic operations. If
> I read libatomic/configure.tgt correctly, then libatomic is marked as
> UNSUPPORTED for all bare-metal targets.
>
> >
> > Maybe the test should just have libatomic_available effective target.
>
> Yes, this works for pru-unknown-elf. But such effective target
> requirement would incorrectly disable the test for bare-metal
> targets which have long long atomic intrinsics.
That doesn't really matter. The test tests the compiler path where the
call to a libatomic function is emitted. So, if it is supported natively,
the test doesn't actually test what it is supposed to test, but a different
path.
Jakub