https://gcc.gnu.org/g:9cfa3139f12123789ac0fb1dd342809c44eb1d15

commit r17-4823-g9cfa3139f12123789ac0fb1dd342809c44eb1d15
Author: Hugo BeauzĂ©e-Luyssen <[email protected]>
Date:   Wed Sep 30 13:21:10 2026 +0000

    libstdc++: skip AIX fat-archive repackage for single-arch builds
    
    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.
    
    Assisted-by: Claude (claude-sonnet-5)
    
    libstdc++-v3/ChangeLog:
    
            * config/os/aix/t-aix: Skip the 32/64 fat-archive repackage
            when MULTIDIRS is empty.

Diff:
---
 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 6676620a7e9f..ae1f36c31216 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

Reply via email to