[gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8
authorTom de Vries <tdevries@suse.de>
Mon, 27 Jun 2022 10:47:26 +0000 (12:47 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 27 Jun 2022 10:47:26 +0000 (12:47 +0200)
commitcdcec216b49a95e6692ab8c5de5693508ba19759
tree2f985ad012d07e445832a10f85b1ad66fd7e777a
parent2043638bf9e8b7ea31b4cbf2c6f7299a3c27efb5
[gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8

After running test-case gdb.fortran/namelist.exp with gfortran 4.8.5, I'm left
with:
...
$ git sti
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        gdb/testsuite/lib/compiler.s

nothing added to commit but untracked files present (use "git add" to track)
...

We're running into PR gcc/60447, which was fixed in gcc 4.9.0.

Workaround this by first copying the source file to the temp dir, such that
the .s file is left there instead:
...
$ ls build/gdb/testsuite/temp/<runtest pid>/
compiler.c  compiler.F90  compiler.s
...

Tested on x86_64-linux.
gdb/testsuite/lib/gdb.exp