glibc2.32 build error for powerpc64-unknown-linux-gnu

Chris Packham Chris.Packham@alliedtelesis.co.nz
Thu Sep 3 09:09:55 GMT 2020


On 3/09/20 2:39 pm, Chris Packham wrote:
>
> On 3/09/20 9:14 am, Chris Packham wrote:
>>
>> On 3/09/20 2:20 am, Adhemerval Zanella wrote:
>>>
>>> On 02/09/2020 05:05, Chris Packham wrote:
>>>> On 2/09/20 7:40 am, Adhemerval Zanella wrote:
>>>>> On 30/08/2020 07:40, Chris Packham via Libc-help wrote:
>>>>>> Hi,
>>>>>>
>>>>>> crosstool-ng was recently updated to add glibc-2.32. We're seeing 
>>>>>> the
>>>>>> following error building for powerpc64
>>>>>>
>>>>>> [ALL  ]      In file included from
>>>>>> ../sysdeps/powerpc/powerpc32/power4/multiarch/wordcopy-ppc32.c:26,
>>>>>> [ALL  ]                       from
>>>>>> ../sysdeps/powerpc/powerpc64/multiarch/wordcopy-ppc64.c:18:
>>>>>> [ALL  ]      ../string/wordcopy.c: In function 
>>>>>> '_wordcopy_fwd_aligned':
>>>>>> [ERROR]      ../string/wordcopy.c:98:26: error: 'a1' may be used
>>>>>> uninitialized in this function [-Werror=maybe-uninitialized]
>>>>>> [ALL  ]         98 |       ((op_t *) dstp)[0] = a1;
>>>>>> [ALL  ]            |       ~~~~~~~~~~~~~~~~~~~^~~~
>>>>>>
>>>>>> Looking at the code in question I think it's a spurious warning. 
>>>>>> There
>>>>>> even appears to be an attempt to turn off the warning in
>>>>>> sysdeps/generic/Makefile but the file is #included for powerpc so 
>>>>>> the
>>>>>> flags applied.
>>>>>>
>>>>>> Bug report with full logs
>>>>>> https://github.com/crosstool-ng/crosstool-ng/issues/1380
>>>>>>
>>>>> I haven't see it with gcc version 9.3.1, so it might be something 
>>>>> related
>>>>> to gcc 10 or newer.  I will build a gcc 10 and check if I can 
>>>>> reproduce it.
>>>> I just tried a crosstool-ng config selecting gcc 9.3.0 and I still see
>>>> the same error.
>>>>
>>> I just tried to reproduce it building powerpc64-linux-gnu, 
>>> powerpc-linux-gnu
>>> and powerpc-linux-gnu-power4 (with --with-cpu-power4) with both gcc 
>>> 9.3.1
>>> and 10, but without success. Are you using any special flags or 
>>> patch for gcc?
>> There are a collection of patches 
>> https://github.com/crosstool-ng/crosstool-ng/tree/master/packages/gcc/10.2.0 
>> mostly just brought forward from older gcc versions. I'll try 
>> disabling them.
>
> Even without any of the glibc or gcc patches and I still see the same 
> error.

I think I might know why you can't see the error. crosstool-ng sets 
-Werror when building glibc. So it's a warning that gets promoted to an 
error by -Werror.

I'll update crosstool-ng to stop doing that for powerpc64 + glibc-2.32.


More information about the Libc-help mailing list