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 libgcc for a single-arch cross build with GNU binutils.
Native multilib builds are unaffected
libgcc/ChangeLog:
* config/rs6000/t-slibgcc-aix: Skip the 32/64 fat-archive
combine when MULTIDIRS is empty.
Assisted-by: Claude (claude-sonnet-5)
Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>
---
libgcc/config/rs6000/t-slibgcc-aix | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/libgcc/config/rs6000/t-slibgcc-aix
b/libgcc/config/rs6000/t-slibgcc-aix
index 06b83057570..4436e89f65b 100644
--- a/libgcc/config/rs6000/t-slibgcc-aix
+++ b/libgcc/config/rs6000/t-slibgcc-aix
@@ -94,10 +94,13 @@ AR_FLAGS_FOR_TARGET = -X32_64
# Build and install AIX-style FAT libraries
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)
ARX=$(shell echo $(AR) | sed -e 's/-X[^ ]*//g')
+endif
all: all-multi
+ifneq ($(MULTIDIRS),)
ifeq ($(enable_shared),yes)
$(ARX) -X$(BITS) x ../ppc$(BITS)/libgcc/libgcc_s.a shr.o
$(ARX) -X$(BITS) rc ./libgcc_s.a shr.o
@@ -119,9 +122,12 @@ ifeq ($(enable_gcov),yes)
$(addprefix ../ppc$(BITS)/libgcc/,$(libgcov-objects))
$(ARX) -X$(BITS) rc ../pthread/libgcc/libgcov.a \
$(addprefix ../pthread/ppc$(BITS)/libgcc/,$(libgcov-objects))
+endif
endif
$(MAKE) install-leaf DESTDIR=$(gcc_objdir) \
slibdir= libsubdir= MULTIOSDIR=$(MULTIDIR)
+ifneq ($(MULTIDIRS),)
cp ../pthread/libgcc/libgcc_s.a ../../gcc/pthread/
cp ../pthread/libgcc/libgcc_eh.a ../../gcc/pthread/
endif
+endif
--
2.43.0