[Mesa-dev] [PATCH] configure.ac: rework -latomic check

Matt Turner mattst88 at gmail.com
Mon May 7 21:07:05 UTC 2018


On Mon, May 7, 2018 at 4:34 AM, Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
> The configure.ac logic added in commit
> 2ef7f23820a67e958c2252bd81eb0458903ebf33 ("configure: check if
> -latomic is needed for __atomic_*") makes the assumption that if a
> 64-bit atomic intrinsic test program fails to link without -latomic,
> it is because we must use -latomic.

I've confused. What is the alternative? Does this patch make Mesa work
when it didn't before?

Does the "whether __sync_add_and_fetch_8 is supported" test then
detect that on your PPC system that we don't have 64-bit atomics and
choose to enable -DMISSING_64BIT_ATOMICS?

If that's the case, them my understanding is that we incorrectly
assume -latomic is needed when in fact there's nothing we can do to
make 64-bit __atomic built-ins work on that platform. So we're
currently deciding that __atomic built-ins are usable since we're only
compiling-testing a 32-bit operation, and then wrongly assuming that
-latomic can make 64-bit operations work. Is that right?

I pushed a patch from someone else that conflicts with this one. I'll
be happy to rebase yours when I push it, after I've sorted out my
confusion. :)


More information about the mesa-dev mailing list