[PATCH] Configure GCC with --enable-initfini-array [BZ #27945]

H.J. Lu hjl.tools@gmail.com
Wed Jun 9 17:46:21 GMT 2021


On Wed, Jun 9, 2021 at 9:07 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Wed, 9 Jun 2021, H.J. Lu via Libc-alpha wrote:
>
> > Starting from GCC 12, the .init_array and .fini_array sections are enabled
> > unconditionally by
> >
> > commit 13a39886940331149173b25d6ebde0850668d8b9
> > Author: H.J. Lu <hjl.tools@gmail.com>
> > Date:   Tue Jun 8 16:09:24 2021 -0700
> >
> >     Always enable DT_INIT_ARRAY/DT_FINI_ARRAY on Linux
> >
> > configure GCC with --enable-initfini-array to enable them when using GCC
> > release branches.
> >
> > Fixes BZ #27945.
>
> The point of build-many-glibcs.py isn't to build a glibc that's in some
> sense optimal.  This option isn't needed to get glibc to build, and it
> doesn't add to the diversity of configurations covered by
> build-many-glibcs.py (actually, it reduces that diversity by making the
> configurations built with older GCC versions more similar to those built
> with GCC 12).  So I don't see adding this GCC configure option as within
> scope for build-many-glibcs.py.

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.   Can
you tell me which native Linux system compilers don't support
DT_INIT_ARRAY/DT_FINI_ARRAY?

-- 
H.J.


More information about the Libc-alpha mailing list