On some platform, it's slow to run uniittests of GCC native or by Qemu user. Let's do it half native.

Build cross

0. apt install g++-multilib-mipsel-linux-gnu # (and other GCC dependency)

1. cd <path_of_gcc_src>

2. mkdir build-mipsel

3 cd build-mipsel

4. ../configure --target=mipsel-linux-gnu \
    --includedir=/usr/mipsel-linux-gnu/include \
   --enable-multilib --with-arch-32=mips32r2 \
   --with-fp-32=xx --enable-multiarch --enable-targets=all \
   --with-arch-64=mips64r2 --prefix=/usr --disable-libsanitizer 

5. make -j

Run test with /usr/mipsel-linux-gnu

   apt install qemu-user-static
   systemctl start systemd-binfmt.service

### ~/.dejagnurc
set boards_dir /home/<USERNAME>/.config/dejagnu

### ~/.config/dejagnu/qemustatic.exp
load_generic_config "unix"

process_multilib_options ""

set_board_info bmk,use_alarm 1

unset_board_info isremote
set_board_info isremote 0

set compiler    "[find_gcc]"
set ret [local_exec "$compiler --print-multiarch" "" "" $timeout]
if { [lindex $ret 0] == 0 } {
    set multiarch "[lindex $ret 1]"
    # Strip the CR or LF off the end of the line as returned by GCC
    regsub -all "\[\n\r\]+" $multiarch "" multiarch
}
# set library path environment variable for qemu
set env(QEMU_LD_PREFIX) /usr/$multiarch

make check-gcc-c -j RUNTESTFLAGS="--tool_opts=-B/usr/mipsel-linux-gnu --target_board=qemustatic"

Run test by SSH

 1. Setup an container of mipsel env, by docker or systemd-container
 2. Setup a passwordless ssh connection.

### ~/.dejagnurc
set boards_dir /home/<USERNAME>/.config/dejagnu

### ~/.config/dejagnu/bookworm-mipsel.exp
# The canonical unix board description.
load_generic_config "unix"

set_board_info hostname "bookworm-mipsel"  # -> use your ssh config name
#set_board_info compiler mipsel-linux-gnu-gcc
set_board_info rsh_prog /usr/bin/ssh
set_board_info rcp_prog /usr/bin/scp

process_multilib_options ""

set_board_info bmk,use_alarm 1

make check-gcc-c  RUNTESTFLAGS="--tool_opts=-B/usr/mipsel-linux-gnu --target_board=bookworm-mipsel"