aarch64: Add fallback if ARM_CC_FOR_TARGET not set
authorPedro Alves <pedro@palves.net>
Tue, 7 Jun 2022 19:11:32 +0000 (20:11 +0100)
committerPedro Alves <pedro@palves.net>
Wed, 8 Jun 2022 13:06:38 +0000 (14:06 +0100)
commitbc2220c89de813bf67d4172a4c483d1e2b843366
tree3dcd343082bab566d49080f7745a51d7e5fe8d2b
parent57698478b75319a962b899c3f8d3a03baa5eaab4
aarch64: Add fallback if ARM_CC_FOR_TARGET not set

On Aarch64, you can set ARM_CC_FOR_TARGET to point to the 32-bit
compiler to use when testing gdb.multi/multi-arch.exp and
gdb.multi/multi-arch-exec.exp.  If you don't set it, then those
testcases don't run.

I guess that approximately nobody remembers to set ARM_CC_FOR_TARGET.

This commit adds a fallback.  If ARM_CC_FOR_TARGET is not set, and
testing for Linux, try arm-linux-gnueabi-gcc,
arm-none-linux-gnueabi-gcc, arm-linux-gnueabihf-gcc as 32-bit
compilers, making sure that the produced executable runs on the target
machine before claiming that the compiler produces useful executables.

Change-Id: Iefe5865d5fc84b4032eaff7f4c5c61582bf75c39
gdb/testsuite/gdb.multi/multi-arch-exec.exp
gdb/testsuite/gdb.multi/multi-arch.exp
gdb/testsuite/lib/gdb.exp