ld/testsuite: allow to force another directory for gcc linker
authorClément Chigot <chigot@adacore.com>
Wed, 14 Sep 2022 13:53:18 +0000 (15:53 +0200)
committerClément Chigot <chigot@adacore.com>
Thu, 22 Sep 2022 07:23:18 +0000 (09:23 +0200)
commitb59f8a90ba0866a8605106fdb09389833c7fe8ad
treeddd8d0259c67918a09017ec8ff4cad17bf2ebdc9
parent3581ae2d450f2c885d9d964668b56ba0cffc83fa
ld/testsuite: allow to force another directory for gcc linker

Add a new variable "ld_testsuite_tmpdir" to enable manual configuration
of the -B flag added to gcc calls. This flag ensure that gcc is invoking
the linker and the assembler we want to test.

When launching the testsuite outside of the build tree, the links made
by the testsuite in tmpdir/ld will point to nothing. Thus, even with the
PATH correctly setup towards the linker directory, gcc might end up
falling back to its default linker. Hence this variable to ensure that
gcc, whatever happens, is using the linker we want.

ld/ChangeLog:

* testsuite/config/default.exp: Allow to change -B flag with
ld_testsuite_bindir variable.
ld/testsuite/config/default.exp