[testsuite] PATCH: Add check_effective_target_pie

H.J. Lu hjl.tools@gmail.com
Mon Jan 12 20:16:00 GMT 2015


On Mon, Jan 12, 2015 at 12:03 PM, Jeff Law <law@redhat.com> wrote:
> On 01/12/15 12:59, H.J. Lu wrote:
>>
>> I don't know if -pg will work PIE on any targets.  For Linux/x86
>> the choices of crt1.o are
>>
>> %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}}
>>
>> -shared, -pg and -pie are mutually exclusive. Those crt1 files are
>> only crt1 files provided by glibc.  You can't even try -pg -pie on
>> Linux without changing glibc.
>
> You're totally missing the point.  What I care about is *why*.
>
> Showing me spec file fragments is totally unhelpful.  What is the technical
> reason why pg and pie are mutually exclusive?

What kind of "technical" reason are you looking for?  glibc doesn't
provide the right crt1 file for GCC to support this combination.  You
can't define GNU_USER_TARGET_STARTFILE_SPEC to support
-pg and -pie.

If you are asking "why" glibc doesn't provide one, my guess is no
one has requested one before.

-- 
H.J.



More information about the Gcc-patches mailing list