I attempted to reproduce Tom Christensen's first problem listed here:
https://lists.gnu.org/r/bug-gnulib/2020-11/msg00062.html
on Solaris 10 sparc, by running this:
./gnulib-tool --create-testdir --dir foo getumask
and then on Solaris:
./configure
make
make check
This failed as follows:
depbase=`echo asyncsafe-spin.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -D_REENTRANT
-g -O2 -MT asyncsafe-spin.o -MD -MP -MF $depbase.Tpo -c -o asyncsafe-spin.o
asyncsafe-spin.c &&\
mv -f $depbase.Tpo $depbase.Po
/usr/ccs/bin/as: "/tmp/ccK0uCIY.s", line 19: error: cannot use v8plus
instructions in a non-v8plus target binary
/usr/ccs/bin/as: "/tmp/ccK0uCIY.s", line 39: error: cannot use v8plus
instructions in a non-v8plus target binary
These diagnostics come from these instructions:
cas [%o0],%o1,%o2
...
membar 2
which come from asm directives in lib/asyncsafe-spin.c. These instructions are
not portable to SPARC v8 processors (32-bit only); they assume SPARC v8+ or
SPARC v9.
I worked around the problem by configuring this way:
./configure CC='gcc -mcpu=v9 -m32'
to compile for SPARC v9, which is fine for my hardware (a production Sun Fire
280R with an UltraSPARC III). I doubt whether anybody outside of computer
museums cares about SPARC v8 hardware any more, but it would be nice if
'configure; make' just worked on Solaris 10 sparc so perhaps the asyncsafe-spin
module should add the '-mcpu=v9 -m32' options on this platform, or maybe
asyncsafe-spin.c could simply omit the relevant instructions on 32-bit sparc
platforms.