On Wed, Sep 30, 2026 at 3:43 PM Jonathan Wakely <[email protected]> wrote:

> This should be CC'd to the gcc-patches list.
>
> I've also CC'd the AIX maintainer. The GCC installation docs do say
> "The native as and ld are recommended for bootstrapping on AIX." I
> don't know if this limitation of the GNU linker is something that
> matters here.
>
> On Wed, 30 Sept 2026 at 14:21, <[email protected]> wrote:
> >
> > From: Hugo Beauzée-Luyssen <[email protected]>
> >
> > GNU binutils' ar cannot build AIX dual 32/64-bit archives, so the
> > 32/64 combine in the top-level MULTIBUILDTOP recipe corrupts the
> > default-arch libstdc++ for a single-arch cross build with GNU binutils.
>

GNU as and GNU ld should handle the AIX "fat" archives, as of a few
years ago.  GNU ar may not have been updated.

Avoiding the "fat" archive when there is no multilib seems like a
reasonable solution that does not harm functionality.

Okay.

David


> >
> > libstdc++-v3/ChangeLog:
> >
> >         * config/os/aix/t-aix: Skip the 32/64 fat-archive repackage
> >         when MULTIDIRS is empty.
> >
> > Assisted-by: Claude (claude-sonnet-5)
> > Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>
> > ---
> >  libstdc++-v3/config/os/aix/t-aix | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/libstdc++-v3/config/os/aix/t-aix
> b/libstdc++-v3/config/os/aix/t-aix
> > index 6676620a7e9..ae1f36c3121 100644
> > --- a/libstdc++-v3/config/os/aix/t-aix
> > +++ b/libstdc++-v3/config/os/aix/t-aix
> > @@ -1,11 +1,14 @@
> >  ifeq ($(MULTIBUILDTOP),)
> > +ifneq ($(MULTIDIRS),)
> >  BITS=$(shell if test -z "`$(CC) -x c -E /dev/null -g3 -o - | grep
> 64BIT`" ; then \
> >      echo '64'; else echo '32'; fi)
> >  MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
> >  ARX=$(shell echo $(AR) | sed -e 's/-X[^ ]*//g')
> >  SUPOBJS=$(shell $(ARX) -X$(BITS) t
> ../ppc$(BITS)/$(PACKAGE)-v3/libsupc++/.libs/libsupc++.a)
> >  FSOBJS=$(shell $(ARX) -X$(BITS) t
> ../ppc$(BITS)/$(PACKAGE)-v3/src/filesystem/.libs/libstdc++fs.a 2>/dev/null)
> > +endif
> >  all-local:
> > +ifneq ($(MULTIDIRS),)
> >         $(ARX) -X$(BITS) rc src/.libs/$(PACKAGE).a
> ../ppc$(BITS)/$(PACKAGE)-v3/src/.libs/$(PACKAGE).so.$(MAJOR)
> >         $(ARX) -X$(BITS) rc
> ../pthread/$(PACKAGE)-v3/src/.libs/$(PACKAGE).a
> ../pthread/ppc$(BITS)/$(PACKAGE)-v3/src/.libs/$(PACKAGE).so.$(MAJOR)
> >         $(ARX) -X$(BITS) rc libsupc++/.libs/libsupc++.a ${addprefix
> ../ppc$(BITS)/$(PACKAGE)-v3/libsupc++/,$(SUPOBJS)}
> > @@ -15,3 +18,4 @@ all-local:
> >                 $(ARX) -X$(BITS) rc
> ../pthread/$(PACKAGE)-v3/src/filesystem/.libs/libstdc++fs.a ${addprefix
> ../pthread/ppc$(BITS)/$(PACKAGE)-v3/src/filesystem/,$(FSOBJS)}; \
> >         fi
> >  endif
> > +endif
> > --
> > 2.43.0
> >
> >
>
>

Reply via email to