Hi all,
While looking into PR121205 I've been testing my fix with a native build
on x86_64 and via a cross compiler. The dg-compile+scan-assembler tests
pass on the native build but fail in the cross build. I'm using a cross
setup here, too, since I'm also testing for targets without native
access and for the sake of automation I still included x86_64.
The native build was configured with
--enable-shared
--with-system-zlib
--enable-threads=posix
--enable-__cxa_atexit
--enable-checking=yes,rtl
--enable-languages=c
--disable-bootstrap
--disable-nls
--disable-graphite
--disable-isl
--without-cloog
--disable-libsanitizer
and the cross build with
--target=x86_64-linux-gnu
--enable-languages=c
--without-headers
--enable-checking=yes,rtl
--disable-nls
Running the tests natively via
make check RUNTESTFLAGS="dg.exp=asm-hard-reg-*.c i386.exp=asm-hard-reg-*.c
--target_board='unix{,-m32}'"
shows no unexpected failures. However, running the tests via cross
compiler some of the tests fail:
...
Target is x86_64-pc-linux-gnu
Host is s390x-ibm-linux-gnu
=== gcc tests ===
Schedule of variations:
unix
unix/-m32
Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for
target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/stefansf/devel/gcc-cross/src/gcc/testsuite/config/default.exp as
tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.
Running /home/stefansf/devel/gcc-cross/src/gcc/testsuite/gcc.dg/dg.exp ...
FAIL: gcc.dg/asm-hard-reg-1.c scan-assembler-times foo\t%ecx 4
FAIL: gcc.dg/asm-hard-reg-6.c scan-assembler-times foo\t4\\(%esp\\),%ecx 1
FAIL: gcc.dg/asm-hard-reg-6.c scan-assembler-times bar\t%ebx,\\(%eax\\) 1
...
Since I have basically zero DejaGnu experience, I'm probably just
missing a detail here. Not sure what the warning about the target
board is about. Before I spend more time on that: is this kind of
testing actually supported? Any hint is highly appreciated.
Cheers,
Stefan