This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH: Check GLIBC_IFUNC to enable/disable ifunc features
- From: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Carlos O'Donell <carlos at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 30 Jun 2016 18:21:44 +0530
- Subject: Re: PATCH: Check GLIBC_IFUNC to enable/disable ifunc features
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOq1+_rMbs1mt3=Md=Wx=7ZxUbD+BhOx-qrO5TBRBrRLww at mail dot gmail dot com> <20160630030947 dot GD3824 at devel dot intra dot reserved-bit dot com> <CAMe9rOrd+DEP1POnXaUaOrCaGqMmrftJbR_6ydFCXQeWueWmag at mail dot gmail dot com> <20160630034351 dot GE3824 at devel dot intra dot reserved-bit dot com> <CAMe9rOpNGtU=mVWEC5fvAABD_bkdM=8kx49KOc_yYkEXiPfx=w at mail dot gmail dot com> <20160630114416 dot GA7564 at devel dot intra dot reserved-bit dot com> <CAMe9rOp0z6coVK51_wp=s1zJaYA0wyVt2+ZJE1qHTqCQjexgKw at mail dot gmail dot com>
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.
Siddhesh