This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]