[PR95720] protect gluefile and wrap_flags with -Wl too
authorAlexandre Oliva <oliva@adacore.com>
Fri, 24 Jul 2020 18:38:35 +0000 (15:38 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 24 Jul 2020 19:13:37 +0000 (16:13 -0300)
commit5fa1767aa45e1a927e832ccc09e959d4c8a9548c
treeca3d07d8a8c62b692e82c12294fa2ff1a85db468
parentaa7e7eff5ec165dc8463a0e74309801b15d1feda
[PR95720] protect gluefile and wrap_flags with -Wl too

The testglue object file gets interpreted as another input file,
changing the dump and aux output names in GCC unless it is protected
by -Wl, like board file-named extra inputs.

Refactor the code that modifies the board settings so that it can be
used to modify regular variables as well, and do so.

for  gcc/testsuite/ChangeLog

PR testsuite/95720
* lib/gcc-defs.exp (gcc_adjust_linker_flags_list): Split out of...
(gcc_adjust_linker_flags): ... this.  Protect gluefile and
wrap_flags.
* gcc.misc-tests/outputs.exp: Use gcc_adjust_linker_flags_list.
gcc/testsuite/gcc.misc-tests/outputs.exp
gcc/testsuite/lib/gcc-defs.exp