[PATCH 1/2] libstdc++: skip AIX fat-archive repackage for single-arch builds
Jonathan Wakely
jwakely@redhat.com
Wed Sep 30 13:43:16 GMT 2026
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, <hugo@beauzee.fr> wrote:
>
> From: Hugo Beauzée-Luyssen <hugo.beauzee@datadoghq.com>
>
> 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.
>
> 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 <hugo.beauzee@datadoghq.com>
> ---
> 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
>
>
More information about the Libstdc++
mailing list