This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][aarch64] Enable ifunc resolver attribute by default
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: sellcey at cavium dot com, gcc-patches at gcc dot gnu dot org
- Cc: nd at arm dot com
- Date: Tue, 05 Sep 2017 18:19:51 +0100
- Subject: Re: [PATCH][aarch64] Enable ifunc resolver attribute by default
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <201706121502.v5CF2Lj1000567@sellcey-dt.caveonetworks.com> <59AD65EC.3020906@arm.com> <1504631373.3182.95.camel@cavium.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 05/09/17 18:09, Steve Ellcey wrote:
> On Mon, 2017-09-04 at 15:40 +0100, Szabolcs Nagy wrote:
>
>> this is not the right default for bionic, uclibc and musl
>>
>> (gcc does not distinguish between supporting ifunc in the
>> compiler vs runtime, so when ifunc is enabled it is assumed
>> the c runtime will have support too, hence libatomic and
>> libgcc starts using ifuncs which breaks at runtime)
>>
>> so don't change the default if target matches
>> *-*-*android*|*-*-*uclibc*|*-*-*musl*)
>>
>> (i think the default should be kept "no" for these targets
>> independently of cpu arch, so the current logic that is
>> repeated many places in config.gcc is suboptimal.
>
> I cleaned up config.gcc so default_gnu_indirect_function is set in a
> single place now and has the right defaults for android/uclibc/musl.
>
thanks, it looks ok to me (but i cannot approve the patch).
>> and i think the attribute syntax should be always supported
>> and this setting should only mean that ifunc use is allowed
>> in the runtime libraries.)
>
> I think that might be a reasonable thing to do but should be a
> separate patch from this change, so I have not done anything
> with that.
>
> I retested on aarch64 but I did not test any of the other platforms
> where I moved the setting of default_gnu_indirect_function, but I
> don't think I changed any defaults.
>
> Steve Ellcey
> sellcey@cavium.com
>
>
> 2017-09-05 Steve Ellcey <sellcey@cavium.com>
>
> * config.gcc: Add new case statement to set
> default_gnu_indirect_function. Remove it from x86_64-*-linux*,
> i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
> s390x-*-linux* case statements. Added aarch64 to the list of
> supported architectures.
>