It looks like the assembly used by Mesa is not x32 compatible yet, and the Mesa build system does not detect that x32 needs assembly disabled either. So without an explicit "--disable-asm", any calls to /usr/libx32/libGL.so.1 result in a segfault in whatever is the first function being accessed. This means that even things like glxinfo and glxgears segfault every time, and also X segfaults when GLAMOR is used.
At the moment all mesa ebuilds only use the "--disable-asm" configure flag when on x86 and with +pic. However, it should also be used for x32 unconditionally.
Looks like there's an upstream bug about this, and it might suffice to mask the nptl USE flag on x32. I'll see if I can test this.
I just tested, and confirmed that indeed it is sufficient to disable the nptl USE flag for Mesa to work properly in x32, as per the upstream bug. One does not need to disable assembly altogether.
Can the nptl USE flag be hardmasked in x32 for the time being, then?
Fixed upstream by
Author: Grazvydas Ignotas <firstname.lastname@example.org>
Date: Sun Jan 8 19:38:09 2017 +0200
mapi: update the asm code to support x32
should be in the 17.0 release and perhaps backported to 13.0.x.
Fixed in the 17 series, and will be in 13.0.4.