[Buildroot] [PATCH 3/3] package/lmbench: fix build failure due to gcc bug 97208

Giulio Benetti giulio.benetti at benettiengineering.com
Sat Aug 14 21:17:13 UTC 2021


Hello Thomas,

On 8/14/21 3:51 PM, Thomas Petazzoni wrote:
> Hello Giulio,
> 
> On Fri, 13 Aug 2021 23:37:45 +0200
> Giulio Benetti <giulio.benetti at benettiengineering.com> wrote:
> 
>> The lmbench package exhibits gcc bug 97208 when built for the Microblaze
>> architecture with optimization enabled, which causes a build failure.
>>
>> As done for other packages in Buildroot work around this gcc bug by
>> setting optimization to -O0 if BR2_TOOLCHAIN_HAS_GCC_BUG_97208=y..
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/ae1/ae1e4d61ed367c6cb64442c60d98882cc7985346/
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
> 
> Are we sure the gcc bug is the same? According to the word-around in
> toolchain wrapper, disabling the  -ftree-loop-distribute-patterns is
> enough... but not for lmbench ?
> 
> What specifically tells us that the lmbench issue is the same as the
> one we worked-around with -fnotree-loop-distribute-patterns in other
> packages ?

You're right, I've been biased by the fact that they fail on the same 
gcc versions and that's all. I don't know why I've ended up to this 
conclusion honestly.

So, I've filed a new gcc bug into gcc bugzilla[1] and treat it with -O0 
since I've given a try with -fnotree-loop-distribute-patterns with no 
luck. Then I'll send a patch to work around gcc bug 101915 on lmbench.

[1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915
-- 
Giulio Benetti
Benetti Engineering sas



More information about the buildroot mailing list