configure.ac: autodetect 'pause' instruction presence on sparc
The change fixes the following build failure on sparc T3 and older CPUs:
sparc-unknown-linux-gnu-gcc ... -O2 -mcpu=niagara2 ... -c rwlock.c
{standard input}: Assembler messages:
{standard input}:398: Error: Architecture mismatch on "pause ".
{standard input}:398: (Requires v9e|v9v|v9m|m8; requested architecture is v9b.)
make[1]: *** [Makefile:280: rwlock.o] Error 1
pause
insutruction exists only on -mcpu=niagara4
(T4
) and upper.
The change adds pause
configure-time autodetection and uses it if available.
config.h.in got new HAVE_SPARC_PAUSE
knob. Fallback is a fall-through no-op.
Build-tested on:
- sparc-unknown-linux-gnu-gcc (no
pause
, build succeeds) - sparc-unknown-linux-gnu-gcc -mcpu=niagara4 (
pause
, build succeeds)
Reported-by: Rolf Eike Beer Bug: https://bugs.gentoo.org/691708 Signed-off-by: Sergei Trofimovich slyfox@gentoo.org (cherry picked from commit a5ad6b16)