[gdb/testsuite] Fix ada tests with -fPIE/-pie
authorTom de Vries <tdevries@suse.de>
Thu, 10 Oct 2019 09:51:34 +0000 (11:51 +0200)
committerTom de Vries <tdevries@suse.de>
Thu, 10 Oct 2019 09:51:34 +0000 (11:51 +0200)
commitabcf2cc85a32a459c2da771c636cc3b6fc985675
treef8e3d683ec78b335811c6d4b1db59510665ae825
parent61f055683254bdccafc49d8e7ae045445d6a31d3
[gdb/testsuite] Fix ada tests with -fPIE/-pie

When running the gdb testsuite with target board unix/-fPIE/-pie, the
resulting ada executables are not PIE executables, because gnatmake doesn't
recognize -pie, and consequently doesn't pass it to gnatlink.

Fix this by replacing "-pie" with "-largs -pie -margs" in
target_compile_ada_from_dir, and doing the same for -no-pie.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-10-10  Tom de Vries  <tdevries@suse.de>

PR testsuite/24888
* lib/ada.exp (target_compile_ada_from_dir): Route -pie/-no-pie to
gnatlink.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/ada.exp