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] Fix various tests to use -no-pie linker flag when needed


On 10/16/2018 11:18 PM, Simon Marchi wrote:
> On 2018-10-14 05:59, Jan Vrany wrote:

>> No, I don't know how universal -no-pie is. From what I have understood
>> from Simon (https://sourceware.org/ml/gdb-patches/2018-08/msg00662.html),
>> out of the options available -no-pie is still the best bet.
> 
> gcc supports it, icc supports it [1], clang supports it starting at version 6 according to my testing.  I think this is universal 
> enough that we can use it.  If somebody stumbles on a compiler that does not understand -no-pie and they really need to use it for 
> their testing, they can quite easily add an option for gdb_compile.  

Not sure it's that universal.  See:

  https://github.com/xd009642/tarpaulin/issues/7#issuecomment-317180523

For example, the gcc 4.8 I have handy (our minimum supported version) does
not support it:

 $ /opt/gcc-4.8/bin/gcc /home/pedro/gdb/tests/main.c -o main -no-pie
 gcc: error: unrecognized command line option ‘-no-pie’

> But for now, I don't think it's worth the extra work.

I disagree.

Thanks,
Pedro Alves


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