PATCH: Check GLIBC_IFUNC to enable/disable ifunc features
H.J. Lu
hjl.tools@gmail.com
Thu Jun 30 13:42:00 GMT 2016
On Thu, Jun 30, 2016 at 5:51 AM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> On Thu, Jun 30, 2016 at 05:01:28AM -0700, H.J. Lu wrote:
>> My scheme is
>>
>> do
>> {
>> if (*env == GLIBC_IFUNC=.*)
>> {
>> process
>> break
>> }
>> env++
>> }
>>
>> We only need to check GLIBC_IFUNC only if it hasn't been found. With
>> GLIBC_IFUNC_X86_XXX, we have to do
>>
>> do
>> {
>> if (*env == GLIBC_IFUNC_X86_*)
>> process
>> env++
>> }
>>
>> We need to check GLIBC_IFUNC_X86 in each iteration.
>
> OK, then how about GLIBC_IFUNC_X86=avx,sse2,sse3..., i.e. a
> comma-separated value for the GLIBC_IFUNC_<ARCH> environment variable.
comma-separator is fine. But we need to both turn it on and off.
Also do we need _X86? GLIBC_IFUNC is processor specific. Why
pollute environment with
GLIBC_IFUNC_ARM
GLIBC_IFUNC_X86
...
--
H.J.
More information about the Libc-alpha
mailing list