[gdb/testsuite] Silence compilation fail in gdb.base/rtld-step.exp
authorTom de Vries <tdevries@suse.de>
Fri, 21 Oct 2022 06:36:18 +0000 (08:36 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 21 Oct 2022 06:36:18 +0000 (08:36 +0200)
commitb4d6b738075e2d4be9b4a8d2080bcf94e6b7e229
tree00f906647956fef6ad2e2fba14885898b806236b
parent68830fbae98867f63720d250a18ce64f9f2f51fc
[gdb/testsuite] Silence compilation fail in gdb.base/rtld-step.exp

With gcc 7.5.0 and test-case gdb.base/rtld-step.exp, I run into:
...
gdb compile failed, gcc: error: unrecognized command line option \
  '-static-pie'; did you mean '-static'?
...

Silence this by checking in the test-case that -static-pie is supported, and
emitting instead:
...
UNTESTED: gdb.base/rtld-step.exp: \
  failed to compile (-static-pie not supported or static libc missing)
...

Tested on x86_64-linux, with:
- gcc 7.5.0: UNTESTED
- gcc 12.2.1 with static glibc not installed: UNTESTED
- gcc 12.2.1 with static glibc installed: PASS
gdb/testsuite/gdb.base/rtld-step.exp