[Mesa-dev] [PATCH mesa] util: improve compiler guard

Eric Engestrom eric at engestrom.ch
Sun Sep 3 08:10:30 UTC 2017


On Friday, 2017-09-01 20:04:33 +0000, Jose Fonseca wrote:
> On 01/09/17 15:54, Eric Engestrom wrote:
> > On Thursday, 2017-08-31 13:28:25 -0500, Rob Herring wrote:
> > > On Thu, Aug 31, 2017 at 11:54 AM, Eric Engestrom
> > > <eric.engestrom at imgtec.com> wrote:
> > > > Glibc 2.26 has dropped xlocale.h, but the functions needed (strtod_l()
> > > > and strdof_l()) can be found in stdlib.h.
> > > > Improve the detection method to allow newer builds to still make use of
> > > > the locale-setting.
> > > > 
> > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102454
> > > > Cc: Laurent Carlier <lordheavym at gmail.com>
> > > > Cc: Emil Velikov <emil.l.velikov at gmail.com>
> > > > Cc: Rob Herring <robh at kernel.org>
> > > > Signed-off-by: Eric Engestrom <eric.engestrom at imgtec.com>
> > > > ---
> > > > 
> > > > Rob, any idea if android needs locale-setting? Emil suggested it might
> > > > always use "C" anyway.
> > > 
> > > Looking at bionic, it just throws away the locale parameter. So it
> > > doesn't really matter which code path mesa uses.
> > 
> > Thanks Rob :)
> > For future reference, this is the link you sent on IRC:
> > https://android.googlesource.com/platform/bionic/+/master/libc/bionic/stdlib_l.cpp
> > 
> > Vinson, Jose: are you guys OK with the basic check I added in scons, or
> > do you know of a better way to check this?
> > 
> 
> These function checks are run every time, so can add some overhead,

Fwiw, it's cached, like the header check:
Checking for C header file xlocale.h... (cached) yes
Checking for C function strtod_l()... (cached) yes
Checking for C function strtof_l()... (cached) yes

> but looks ok for now.  We can can try to improve if the itch is too
> great.
> 
> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

Thanks! I just pushed it with both r-bs.
> 
> Jose


More information about the mesa-dev mailing list