[PATCH] Configure GCC with --enable-initfini-array [BZ #27945]
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Nov 5 19:45:33 GMT 2021
On 09/06/2021 17:44, Joseph Myers wrote:
> On Wed, 9 Jun 2021, Adhemerval Zanella via Libc-alpha wrote:
>
>> On 09/06/2021 15:02, Joseph Myers wrote:
>>> On Wed, 9 Jun 2021, H.J. Lu via Libc-alpha wrote:
>>>
>>>> I disagree. The behavior of the cross compiler should be as close to the native
>>>> Linux system compiler, not other versions of cross compilers, as possible.
>>>
>>> But fixing that was the point of your GCC patch. I don't think working
>>> around deficiencies in previous versions of GCC, that aren't necessary to
>>> work around for building glibc, is within scope for build-many-glibcs.py;
>>> it's enough that the bug (cross compiler different from native) was fixed
>>> in the logically correct place (in GCC, for future GCC releases).
>>
>> But this also does not have any really drawback, correct?
>
> It's one more thing to track when to remove when the minimum GCC version
> for building glibc increases. (We have such a comment on the use of
> --disable-libcilkrts. We ought to have one on the use of
> --disable-libmpx. If we used --enable-initfini-array, that should have
> such a comment as well.)
>
So I stumbled across this issues while testing powerpc64le with the
build-many-glibcs built gcc with lld, which does not support .ctors
(it just ignores the sections instead of converting it on .init_array).
I agree with H.J that is unfortunate that gcc has the issue and
although it does not prevent to work against ld.bfd, it might prevent
glibc to be built properly with other linkers.
So I think it would be good to have such patch upstream with.
More information about the Libc-alpha
mailing list