[Buildroot] [PATCH v2 07/11] package/flex: disable reallocarray

Romain Naour romain.naour at gmail.com
Thu Sep 7 21:32:41 UTC 2017


Hi Thomas,

Le 03/09/2017 à 09:14, Thomas Petazzoni a écrit :
> Hello,
> 
> On Sun, 3 Sep 2017 00:23:40 +0200, Romain Naour wrote:
> 
>>> This commit log is a bit mysterious: if reallocarray() has been
>>> introduced in glibc 2.26, why isn't flex able to use it ?  
>>
>> It's a nasty issue, when reallocarray() is available for the target, flex will
>> build a small tool called stage1flex for the host (using _FOR_BUILD) but with
>> the config.h generated for the target.
>>
>> My host doesn't have glibc 2.26, so reallocarray() is never defined while
>> building stage1flex:
>>
>> misc.c:147:8: warning : implicit declaration of function « reallocarray »
>> [-Wimplicit-function-declaration]
>>   mem = reallocarray(NULL, (size_t) size, element_size);
>>         ^~~~~~~~~~~~
>> misc.c:147:6: warning : assignment makes pointer from integer without a cast
>> [-Wint-conversion]
>>   mem = reallocarray(NULL, (size_t) size, element_size);
>>       ^
>>
>> I don't know how to fix this, except by disabling reallocarray() for the target...
> 
> This should all be explained in the commit log, and a short comment in
> flex.mk should be added as well.

Actually I looked further into this issue after sending the patch.

> 
> Generally speaking, the commit logs in this series are too terse: they
> just say "fix build with glibc 2.26" with no explanations, or they
> backport some seemingly random glibc patches, without explaining why
> they are needed. Could you improve this a bit ?

Well, the glibc bump is more complicated than expected and I need to spent more
time on it to understand what's going on...

At least we have a link to the upstream reference as a starting point.
Ok, this patch is really too terse, I added it just before sending the series :-/

I'll try to continue this week-end.

Best regards,
Romain

> 
> Thanks a lot!
> 
> Thomas
> 




More information about the buildroot mailing list