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

Jose Fonseca jfonseca at vmware.com
Fri Sep 1 20:03:42 UTC 2017


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, 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>

Jose


More information about the mesa-dev mailing list