[PATCH][gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable
Pedro Alves
palves@redhat.com
Fri Aug 16 18:49:00 GMT 2019
On 7/23/19 8:22 AM, Tom de Vries wrote:
> When running gdb.base/dump.exp with --target_board=unix/-fPIE/-pie, we get:
> ...
> Running gdb/testsuite/gdb.base/dump.exp ...
> FAIL: gdb.base/dump.exp: dump array as value, intel hex
> ...
>
> The FAIL happens because although the test specifies nopie, the exec is
> in fact compiled as PIE. The "-fPIE -pie" options specified using the
> target_board are interpreted by dejagnu as multilib_flags, and end up
> overriding the nopie flags.
I'd think it would be better to temporarily strip out -fPIE/-pie (*)
from multilib_flags if nopie is set?
(*) - and/or the contents of gdb,pie_ldflag gdb,pie_flag.
Thanks,
Pedro Alves
More information about the Gdb-patches
mailing list