On Fedora rawhide the ppc64le build fails with: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../include -I../../../coregrind -I../../../include -I../../../VEX/pub -I../../../VEX/pub -DVGA_ppc64le=1 -DVGO_linux=1 -DVGP_ppc64le_linux=1 -DVGPV_ppc64le_linux_vanilla=1 -Winline -Wall -Wshadow -Wno-long-long -g -m64 -c -o lsw.o lsw.c /tmp/ccn4kxN6.s: Assembler messages: /tmp/ccn4kxN6.s:133: Error: `lswi' invalid when little-endian /tmp/ccn4kxN6.s:186: Error: `lswi' invalid when little-endian /tmp/ccn4kxN6.s:252: Error: `lswx' invalid when little-endian /tmp/ccn4kxN6.s:316: Error: `lswi' invalid when little-endian /tmp/ccn4kxN6.s:317: Error: `stswi' invalid when little-endian /tmp/ccn4kxN6.s:349: Error: `lswi' invalid when little-endian /tmp/ccn4kxN6.s:350: Error: `stswi' invalid when little-endian /tmp/ccn4kxN6.s:385: Error: `lswx' invalid when little-endian /tmp/ccn4kxN6.s:386: Error: `stswx' invalid when little-endian make[5]: *** [Makefile:1053: lsw.o] Error 1 This is because the latest binutils has: commit 86c0f617ac5f3a5f4aab76c7f90255254ca27576 Author: Alan Modra <amodra@gmail.com> Date: Mon Aug 10 15:06:43 2020 +0930 Error on lmw, lswi and related PowerPC insns when LE * config/tc-ppc.c (md_assemble): Error for lmw, stmw, lswi, lswx, stswi, or stswx in little-endian mode. * testsuite/gas/ppc/476.d, * testsuite/gas/ppc/476.s: Delete lmw, stmw, lswi, lswx, stswi, stswx. * testsuite/gas/ppc/a2.d, * testsuite/gas/ppc/a2.s: Move lmw, stmw, lswi, lswx, stswi, stswx.. * testsuite/gas/ppc/be.d, * testsuite/gas/ppc/be.s: ..to here, new big-endian only test. * testsuite/gas/ppc/le_error.d, * testsuite/gas/ppc/le_error.l: New little-endian test. * testsuite/gas/ppc/ppc.exp: Run new tests.
Created attachment 132536 [details] Don't compile ppc64be tests on ppc64le There is a similar issue with the ldst_multiple testcase. This patch works around it by not building (or running) both tests unless on ppc64be.
The change looks reasonable to me. +# lsw compiles (and runs) only on big endian. +if VGCONF_PLATFORMS_INCLUDE_PPC64BE_LINUX +check_PROGRAMS += lsw ldst_multiple +endif The comment there could be updated since this change includes more than just lsw, but thats not a big deal. Thanks!
commit 74b74174d572fee4015b8f4e326db3cd949bcdc3 Author: Mark Wielaard <mark@klomp.org> Date: Tue Dec 1 14:57:39 2020 +0100 lmw, lswi and related PowerPC insns aren't allowed on ppc64le Newer binutils produce an error when the assembly contains lmw, stmw, lswi, lswx, stswi, or stswx instructions in little-endian mode. Only build and run the lsw and ldst_multiple testcases on ppc64[be]. https://bugs.kde.org/show_bug.cgi?id=427870