[gdb/testsuite] Handle unrecognized command line option in gdb_compile_test
authorTom de Vries <tdevries@suse.de>
Fri, 10 Sep 2021 15:16:48 +0000 (17:16 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 10 Sep 2021 15:16:48 +0000 (17:16 +0200)
commit49a9ec7f6a37117519aba9d3e31b1fe17a9dc029
treec64db3ecfc42a69a456e00b1035cfd74a0d0ba46
parente7776f52fedcafc63619abb2928151cf5bbfcce2
[gdb/testsuite] Handle unrecognized command line option in gdb_compile_test

When running the gdb testsuite with gnatmake-4.8, I get many fails of the
following form:
...
gcc: error: unrecognized command line option '-fgnat-encodings=all'^M
gnatmake: "gdb.ada/O2_float_param/foo.adb" compilation error^M
compiler exited with status 1
compilation failed: gcc ... gdb.ada/O2_float_param/foo.adb
gcc: error: unrecognized command line option '-fgnat-encodings=all'
gnatmake: "gdb.ada/O2_float_param/foo.adb" compilation error
FAIL: gdb.ada/O2_float_param.exp: scenario=all: compilation foo.adb
...

Fix this by marking the test unsupported instead, such that we have:
...
UNSUPPORTED: gdb.ada/O2_float_param.exp: scenario=all: compilation foo.adb \
  (unsupported option '-fgnat-encodings=all')
...

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