This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][gdb/testsuite] Fix ada tests with -fPIE/-pie
- From: Tom Tromey <tom at tromey dot com>
- To: Tom de Vries <tdevries at suse dot de>
- Cc: gdb-patches at sourceware dot org, Tom Tromey <tom at tromey dot com>, Joel Brobecker <brobecker at gnat dot com>
- Date: Wed, 07 Aug 2019 08:18:26 -0600
- Subject: Re: [PATCH][gdb/testsuite] Fix ada tests with -fPIE/-pie
- References: <20190807110713.GA23000@delia>
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> When running the gdb testsuite with target board unix/-fPIE/-pie, the
Tom> resulting ada executables are not PIE executables, because gnatmake doesn't
Tom> recognize -pie, and consequently doesn't pass it to gnatlink.
Tom> Fix this by replacing "-pie" with "-largs -pie -margs" for ada test-cases in
Tom> gdb_default_target_compile, and doing the same for -no-pie.
I think this is a good idea overall.
However, is gdb_default_target_compile still used? And if so, by what
path? My understanding is that with a "new enough" dejagnu, it won't be
used -- so some users might still see the old behavior.
Basically gdb_default_target_compile is all a big monkeypatching hack
and it would be way better to have some kind of more principled approach
upstream. I don't know what that would look like. And of course to get
there we'd probably need even more monkeypatching.
Tom