AIX-style libraries contains both 32 and 64 bit shared objects.
This patch follows the adding of FAT libraries support in other gcc
libraries (libgcc, listdc++, etc).
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/242957
-2d105e65cca6b536320284273353b7c640b12c5f
+587d4595e446c597efe97ccdc81b2f05cbc04a21
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
find . -name '*.lo.dep' -print | xargs rm -f
include $(top_srcdir)/../multilib.am
+
+if LIBGO_IS_AIX
+ALL_LOCAL_DEPS = add-aix-fat-library
+else
+ALL_LOCAL_DEPS =
+endif
+all-local: $(ALL_LOCAL_DEPS)
+
+MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
+add-aix-fat-library: all-multi
+ @if test "$(MULTIBUILDTOP)" = ""; then \
+ ${AR} -X$(AIX_DEFAULT_ARCH) rc .libs/$(PACKAGE).a ../ppc$(AIX_DEFAULT_ARCH)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR); \
+ ${AR} -X$(AIX_DEFAULT_ARCH) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(AIX_DEFAULT_ARCH)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR); \
+ fi
CSCOPE = cscope
DIST_SUBDIRS = testsuite
ACLOCAL = @ACLOCAL@
+AIX_DEFAULT_ARCH = @AIX_DEFAULT_ARCH@
ALLGOARCH = @ALLGOARCH@
ALLGOARCHFAMILY = @ALLGOARCHFAMILY@
ALLGOOS = @ALLGOOS@
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
+@LIBGO_IS_AIX_FALSE@ALL_LOCAL_DEPS =
+@LIBGO_IS_AIX_TRUE@ALL_LOCAL_DEPS = add-aix-fat-library
+MAJOR = $(firstword $(subst :, ,$(libtool_VERSION)))
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
clean-local: clean-multi
distclean-local: distclean-multi
maintainer-clean-local: maintainer-clean-multi
+all-local: $(ALL_LOCAL_DEPS)
+add-aix-fat-library: all-multi
+ @if test "$(MULTIBUILDTOP)" = ""; then \
+ ${AR} -X$(AIX_DEFAULT_ARCH) rc .libs/$(PACKAGE).a ../ppc$(AIX_DEFAULT_ARCH)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR); \
+ ${AR} -X$(AIX_DEFAULT_ARCH) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(AIX_DEFAULT_ARCH)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR); \
+ fi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+AIX_DEFAULT_ARCH
am__fastdepCCAS_FALSE
am__fastdepCCAS_TRUE
CCASDEPMODE
# static hash tables crashes on AIX when libgo is built with O2
CFLAGS="$CFLAGS -fno-section-anchors"
GOCFLAGS="$GOCFLAGS -fno-section-anchors"
+
+ # Check default architecture for FAT library creation
+ if test -z "`$(CC) -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
+ AIX_DEFAULT_ARCH='64'
+ else
+ AIX_DEFAULT_ARCH='32'
+ fi
+
;;
esac
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11495 "configure"
+#line 11602 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11601 "configure"
+#line 11708 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
# static hash tables crashes on AIX when libgo is built with O2
CFLAGS="$CFLAGS -fno-section-anchors"
GOCFLAGS="$GOCFLAGS -fno-section-anchors"
+
+ # Check default architecture for FAT library creation
+ if test -z "`$(CC) -x c -E /dev/null -g3 -o - | grep 64BIT`" ; then
+ AIX_DEFAULT_ARCH='64'
+ else
+ AIX_DEFAULT_ARCH='32'
+ fi
+ AC_SUBST(AIX_DEFAULT_ARCH)
;;
esac
DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
ACLOCAL = @ACLOCAL@
+AIX_DEFAULT_ARCH = @AIX_DEFAULT_ARCH@
ALLGOARCH = @ALLGOARCH@
ALLGOARCHFAMILY = @ALLGOARCHFAMILY@
ALLGOOS = @ALLGOOS@