aix: Add GCC64 configuration and FAT target libraries.
authorDavid Edelsohn <dje.gcc@gmail.com>
Fri, 15 May 2020 21:46:08 +0000 (17:46 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sun, 21 Jun 2020 18:14:46 +0000 (14:14 -0400)
This patch adds the ability to configure GCC on AIX to build as a
64 bit application and to build target libraries "FAT" libraries in both
32 bit and 64 bit mode.

The patch adds makefile fragment hooks to target libraries that allows
them to include target-specific rules.  The target specific rules for
AIX place both 32 bit and 64 bit objects and shared objects
in archives at the top-level, not multilib subdirectories.  The
multilibs are built in subdirectories, but must be combined during the
last parts of the target library build process.  Because of the way
that GCC bootstrap works, the libraries must be combined during the
multiple stages of GCC bootstrap, not solely when installed in the
final destination, so the libraries are correct at the end of
each target library build stage, not solely an install recipe.

gcc/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* config.gcc: Use t-aix64, biarch64 and default64 for cpu_is_64bit.
* config/rs6000/aix72.h (ASM_SPEC): Remove aix64 option.
(ASM_SPEC32): New.
(ASM_SPEC64): New.
(ASM_CPU_SPEC): Remove vsx and altivec options.
(CPP_SPEC_COMMON): Rename from CPP_SPEC.
(CPP_SPEC32): New.
(CPP_SPEC64): New.
(CPLUSPLUS_CPP_SPEC): Rename to CPLUSPLUS_CPP_SPEC_COMMON..
(TARGET_DEFAULT): Only define if not BIARCH.
(LIB_SPEC_COMMON): Rename from LIB_SPEC.
(LIB_SPEC32): New.
(LIB_SPEC64): New.
(LINK_SPEC_COMMON): Rename from LINK_SPEC.
(LINK_SPEC32): New.
(LINK_SPEC64): New.
(STARTFILE_SPEC): Add 64 bit version of crtcxa and crtdbase.
(ASM_SPEC): Define 32 and 64 bit alternatives using DEFAULT_ARCH64_P.
(CPP_SPEC): Same.
(CPLUSPLUS_CPP_SPEC): Same.
(LIB_SPEC): Same.
(LINK_SPEC): Same.
(SUBTARGET_EXTRA_SPECS): Add new 32/64 specs.
* config/rs6000/defaultaix64.h: New file.
* config/rs6000/t-aix64: New file.

libgcc/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* config.host (extra_parts): Add crtcxa_64 and crtdbase_64.
* config/rs6000/t-aix-cxa: Explicitly compile 32 bit with -maix32
and 64 bit with -maix64.
* config/rs6000/t-slibgcc-aix: Remove extra @multilib_dir@ level.
Build and install AIX-style FAT libraries.

libgomp/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
* Makefile.in: Regenerate
* configure.ac (tmake_file): Substitute.
* configure: Regenerate.
* configure.tgt (powerpc-ibm-aix*): Define tmake_file.
* config/t-aix: New file.

libstdc++-v3/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
* Makefile.in: Regenerate.
* configure.ac (tmake_file): Substitute.
* configure: Regenerate.
* configure.host (aix*): Define tmake_file.
* config/os/aix/t-aix: New file.

libatomic/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
* Makefile.in: Regenerate.
* configure.ac (tmake_file): Substitute.
* configure: Regenerate.
* configure.tgt (powerpc-ibm-aix*): Define tmake_file.
* config/t-aix: New file.

libgfortran/ChangeLog

2020-06-21  David Edelsohn  <dje.gcc@gmail.com>

* Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
* Makefile.in: Regenerate.
* configure.ac (tmake_file): Substitute.
* configure: Regenerate.
* configure.host: Add system configury stanza. Define tmake_file.
* config/t-aix: New file.

31 files changed:
gcc/config.gcc
gcc/config/rs6000/aix72.h
gcc/config/rs6000/defaultaix64.h [new file with mode: 0644]
gcc/config/rs6000/t-aix64 [new file with mode: 0644]
libatomic/Makefile.am
libatomic/Makefile.in
libatomic/config/t-aix [new file with mode: 0644]
libatomic/configure
libatomic/configure.ac
libatomic/configure.tgt
libgcc/config.host
libgcc/config/rs6000/t-aix-cxa
libgcc/config/rs6000/t-slibgcc-aix
libgfortran/Makefile.am
libgfortran/Makefile.in
libgfortran/config/t-aix [new file with mode: 0644]
libgfortran/configure
libgfortran/configure.ac
libgfortran/configure.host
libgomp/Makefile.am
libgomp/Makefile.in
libgomp/config/t-aix [new file with mode: 0644]
libgomp/configure
libgomp/configure.ac
libgomp/configure.tgt
libstdc++-v3/Makefile.am
libstdc++-v3/Makefile.in
libstdc++-v3/config/os/aix/t-aix [new file with mode: 0644]
libstdc++-v3/configure
libstdc++-v3/configure.ac
libstdc++-v3/configure.host

index 06ad813ad39761ee752d03ab797162b345ff01f2..365263a0f46282c822ad404cd5173d95a2a277ef 100644 (file)
@@ -3040,8 +3040,12 @@ rs6000-ibm-aix7.1.* | powerpc-ibm-aix7.1.*)
        default_use_cxa_atexit=yes
        ;;
 rs6000-ibm-aix[789].* | powerpc-ibm-aix[789].*)
-       tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
        tmake_file="rs6000/t-aix52 t-slibgcc"
+       if test x$cpu_is_64bit = xyes; then
+           tm_file="${tm_file} rs6000/biarch64.h rs6000/defaultaix64.h"
+           tmake_file="rs6000/t-aix64 t-slibgcc"
+       fi
+       tm_file="${tm_file} rs6000/aix.h rs6000/aix72.h rs6000/xcoff.h rs6000/aix-stdint.h"
        extra_options="${extra_options} rs6000/aix64.opt"
        use_collect2=yes
        thread_file='aix'
index 6cb1673cc902337f565e7bc606ee137a5fdb03ca..b0262afb2602e2a3f5620252c31f17196ba4b68a 100644 (file)
@@ -64,8 +64,9 @@ do {                                                                  \
     }                                                                  \
 } while (0)
 
-#undef ASM_SPEC
-#define ASM_SPEC "-u %{maix64:-a64} %(asm_cpu)"
+#define ASM_SPEC32 "-a32"
+#define ASM_SPEC64 "-a64"
+#define ASM_SPEC_COMMON "-u %(asm_cpu)"
 
 /* Common ASM definitions used by ASM_SPEC amongst the various targets for
    handling -mcpu=xxx switches.  There is a parallel list in driver-rs6000.c to
@@ -91,10 +92,7 @@ do {                                                                 \
   mcpu=620: -m620; \
   mcpu=630: -m620; \
   mcpu=970|mcpu=G5: -m970; \
-  !mcpu*: %{mvsx: -mpwr6; \
-           maltivec: -m970; \
-           maix64|mpowerpc64: -mppc64; \
-           : %(asm_default)}} \
+  !mcpu*: %(asm_default)} \
 -many"
 
 #undef ASM_DEFAULT_SPEC
@@ -115,19 +113,17 @@ do {                                                                      \
     }                                \
   while (0)
 
-#undef CPP_SPEC
-#define CPP_SPEC "%{posix: -D_POSIX_SOURCE}    \
+#define CPP_SPEC32 ""
+#define CPP_SPEC64 "-D__64BIT__"
+#define CPP_SPEC_COMMON "%{posix: -D_POSIX_SOURCE} \
   %{ansi: -D_ANSI_C_SOURCE}                    \
-  %{maix64: -D__64BIT__}                       \
   %{mpe: -I%R/usr/lpp/ppe.poe/include}         \
   %{pthread: -D_THREAD_SAFE}"
 
 /* The GNU C++ standard library requires that these macros be 
    defined.  Synchronize with libstdc++ os_defines.h.  */
-#undef CPLUSPLUS_CPP_SPEC                       
-#define CPLUSPLUS_CPP_SPEC                     \
+#define CPLUSPLUS_CPP_SPEC_COMMON              \
   "-D_ALL_SOURCE -D__COMPATMATH__              \
-   %{maix64: -D__64BIT__}                      \
    %{mpe: -I%R/usr/lpp/ppe.poe/include}                \
    %{pthread: -D_THREAD_SAFE}"
 
@@ -135,8 +131,10 @@ do {                                                                       \
 #include "rs6000-cpus.def"
 #undef RS6000_CPU
 
+#ifndef RS6000_BI_ARCH
 #undef  TARGET_DEFAULT
 #define TARGET_DEFAULT ISA_2_6_MASKS_EMBEDDED
+#endif
 
 #undef  PROCESSOR_DEFAULT
 #define PROCESSOR_DEFAULT PROCESSOR_POWER7
@@ -155,29 +153,78 @@ do {                                                                      \
    the target makefile fragment or if none of the options listed in
    `MULTILIB_OPTIONS' are set by default.  *Note Target Fragment::.  */
 
-#undef MULTILIB_DEFAULTS
+#undef MULTILIB_DEFAULTS
 
-#undef LIB_SPEC
-#define LIB_SPEC "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
+#define DEFAULT_ARCH64_P (TARGET_DEFAULT & MASK_64BIT)
+
+#define LIB_SPEC32 "%{!shared:%{g*:-lg}}"
+#define LIB_SPEC64 ""
+#define LIB_SPEC_COMMON "%{pg:-L%R/lib/profiled -L%R/usr/lib/profiled}\
    %{p:-L%R/lib/profiled -L%R/usr/lib/profiled}\
-   %{!maix64:%{!shared:%{g*:-lg}}}\
    %{fprofile-arcs|fprofile-generate*|coverage:-lpthreads}\
    %{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
    %{mlong-double-128:-lc128}\
    %{pthread:-lpthreads} -lc"
 
-#undef LINK_SPEC
-#define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
+#define LINK_SPEC32 "%{!shared:%{g*: %(link_libg) }} -b32"
+#define LINK_SPEC64 "-b64"
+#define LINK_SPEC_COMMON "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
    %{static:-bnso %(link_syscalls) } %{shared:-bM:SRE %{!e:-bnoentry}}\
-   %{!maix64:%{!shared:%{g*: %(link_libg) }}} %{maix64:-b64}\
-   %{mpe:-binitfini:poe_remote_main}"
+   %{mpe:-binitfini:poe_remote_main} "
 
 #undef STARTFILE_SPEC
+#if DEFAULT_ARCH64_P
+#define STARTFILE_SPEC "%{!shared:\
+   %{!maix32:%{pg:gcrt0_64%O%s;:%{p:mcrt0_64%O%s;:crt0_64%O%s}};:\
+     %{pthread:%{pg:gcrt0_r%O%s;:%{p:mcrt0_r%O%s;:crt0_r%O%s}};:\
+       %{pg:gcrt0%O%s;:%{p:mcrt0%O%s;:crt0%O%s}}}}}\
+   %{!maix32:%{shared:crtcxa_64_s%O%s;:crtcxa_64%O%s} crtdbase_64%O%s;:\
+     %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s}"
+#else
 #define STARTFILE_SPEC "%{!shared:\
    %{maix64:%{pg:gcrt0_64%O%s;:%{p:mcrt0_64%O%s;:crt0_64%O%s}};:\
      %{pthread:%{pg:gcrt0_r%O%s;:%{p:mcrt0_r%O%s;:crt0_r%O%s}};:\
        %{pg:gcrt0%O%s;:%{p:mcrt0%O%s;:crt0%O%s}}}}}\
-   %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s"
+   %{maix64:%{shared:crtcxa_64_s%O%s;:crtcxa_64%O%s} crtdbase_64%O%s;:\
+     %{shared:crtcxa_s%O%s;:crtcxa%O%s} crtdbase%O%s}"
+#endif
+
+
+#undef ASM_SPEC
+#undef CPP_SPEC
+#undef CPLUSPLUS_CPP_SPEC
+#undef LIB_SPEC
+#undef LINK_SPEC
+
+#if DEFAULT_ARCH64_P
+#define ASM_SPEC "%{maix32:%(asm_spec32);:%(asm_spec64)} %(asm_spec_common)"
+#define CPP_SPEC "%{maix32:%(cpp_spec32);:%(cpp_spec64)} %(cpp_spec_common)"
+#define CPLUSPLUS_CPP_SPEC "%{maix32:%(cpp_spec32);:%(cpp_spec64)} %(cplusplus_cpp_spec_common)"
+#define LIB_SPEC "%{maix32:%(lib_spec32);:%(lib_spec64)} %(lib_spec_common)"
+#define LINK_SPEC "%{maix32:%(link_spec32);:%(link_spec64)} %(link_spec_common)"
+#else
+#define ASM_SPEC "%{maix64:%(asm_spec64);:%(asm_spec32)} %(asm_spec_common)"
+#define CPP_SPEC "%{maix64:%(cpp_spec64);:%(cpp_spec32)} %(cpp_spec_common)"
+#define CPLUSPLUS_CPP_SPEC "%{maix64:%(cpp_spec64);:%(cpp_spec32)} %(cplusplus_cpp_spec_common)"
+#define LIB_SPEC "%{maix64:%(lib_spec64);:%(lib_spec32)} %(lib_spec_common)"
+#define LINK_SPEC "%{maix64:%(link_spec64);:%(link_spec32)} %(link_spec_common)"
+#endif
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS                                  \
+  { "asm_spec_common",         ASM_SPEC_COMMON },              \
+  { "asm_spec32",              ASM_SPEC32 },                   \
+  { "asm_spec64",              ASM_SPEC64 },                   \
+  { "cpp_spec_common",         CPP_SPEC_COMMON },              \
+  { "cplusplus_cpp_spec_common", CPLUSPLUS_CPP_SPEC_COMMON },  \
+  { "cpp_spec32",              CPP_SPEC32 },                   \
+  { "cpp_spec64",              CPP_SPEC64 },                   \
+  { "lib_spec_common",         LIB_SPEC_COMMON },              \
+  { "lib_spec32",              LIB_SPEC32 },                   \
+  { "lib_spec64",              LIB_SPEC64 },                   \
+  { "link_spec_common",                LINK_SPEC_COMMON },             \
+  { "link_spec32",             LINK_SPEC32 },                  \
+  { "link_spec64",             LINK_SPEC64 },
 
 /* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int".  */
 
diff --git a/gcc/config/rs6000/defaultaix64.h b/gcc/config/rs6000/defaultaix64.h
new file mode 100644 (file)
index 0000000..ecac576
--- /dev/null
@@ -0,0 +1,28 @@
+/* Definitions of target machine for GNU compiler,
+   for 64 bit powerpc linux defaulting to -m64.
+   Copyright (C) 2003-2020 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#define RS6000_CPU(NAME, CPU, FLAGS)
+#include "rs6000-cpus.def"
+#undef RS6000_CPU
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (ISA_2_6_MASKS_EMBEDDED | MASK_POWERPC64 | MASK_64BIT)
+#undef ASM_DEFAULT_SPEC
+#define ASM_DEFAULT_SPEC "-mpwr7"
diff --git a/gcc/config/rs6000/t-aix64 b/gcc/config/rs6000/t-aix64
new file mode 100644 (file)
index 0000000..8134e19
--- /dev/null
@@ -0,0 +1,27 @@
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+# Build the libraries for pthread and all of the
+# different processor models
+
+MULTILIB_OPTIONS       = pthread maix64/maix32
+
+MULTILIB_DIRNAMES      = pthread ppc64 ppc32
+
+MULTILIB_MATCHES       = .=maix32
+
index 133fbbca77ebbcd7964dde2e12a8928fbd4b6191..f169d505227c23355ddf76c82172b2f846edb324 100644 (file)
@@ -153,4 +153,9 @@ libatomic_convenience_la_LIBADD = $(libatomic_la_LIBADD)
 all-multi: $(libatomic_la_LIBADD)
        $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 include $(top_srcdir)/../multilib.am
index a51807e95c95643ed58dbe4ab07af4a96f99c501..e8d47f28364f679492417bab13bb1d88e0288d04 100644 (file)
@@ -376,6 +376,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+tmake_file = @tmake_file@
 toolexecdir = @toolexecdir@
 toolexeclibdir = @toolexeclibdir@
 top_build_prefix = @top_build_prefix@
@@ -862,6 +863,11 @@ vpath % $(strip $(search_path))
 all-multi: $(libatomic_la_LIBADD)
        $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 # GNU Make needs to see an explicit $(MAKE) variable in the command it
 # runs to enable its job server during parallel builds.  Hence the
 # comments below.
diff --git a/libatomic/config/t-aix b/libatomic/config/t-aix
new file mode 100644 (file)
index 0000000..53c2d83
--- /dev/null
@@ -0,0 +1,10 @@
+ifeq ($(MULTIBUILDTOP),)
+BITS=$(shell if test -z "`ar -X64 t .libs/$(PACKAGE).a`" ; then \
+    echo '64'; else echo '32'; fi)
+#MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
+MAJOR=1
+all-local:
+       ar -X$(BITS) rc .libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+       ar -X$(BITS) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+endif
+
index b441636c85b4adcd6574e077eaeab1b62fff71db..2acaffe441aaccc8126ec4cd5080b84820408844 100755 (executable)
@@ -643,6 +643,7 @@ ARCH_AARCH64_LINUX_FALSE
 ARCH_AARCH64_LINUX_TRUE
 HAVE_IFUNC_FALSE
 HAVE_IFUNC_TRUE
+tmake_file
 SIZES
 XLDFLAGS
 XCFLAGS
@@ -11387,7 +11388,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11390 "configure"
+#line 11391 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11493,7 +11494,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11496 "configure"
+#line 11497 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15668,6 +15669,19 @@ XCFLAGS="$XCFLAGS $XPCFLAGS"
 
 
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+
+
+
  if test x$libat_cv_have_ifunc = xyes; then
   HAVE_IFUNC_TRUE=
   HAVE_IFUNC_FALSE='#'
index 7ac8911c342589eb45013bb55aac95e25bbeb104..d74bd7c4c18d98bc369798856ca2d47f61f36534 100644 (file)
@@ -268,6 +268,19 @@ AC_SUBST(XLDFLAGS)
 AC_SUBST(LIBS)
 AC_SUBST(SIZES)
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+AC_SUBST(tmake_file)
+
+
 AM_CONDITIONAL(HAVE_IFUNC, test x$libat_cv_have_ifunc = xyes)
 AM_CONDITIONAL(ARCH_AARCH64_LINUX,
               [expr "$config_path" : ".* linux/aarch64 .*" > /dev/null])
index 5dd0926d207f1a542a7a7ee4cc00084c3c74bdfd..efb3b1efb6898c23318a7082544d72ac0279d18c 100644 (file)
@@ -117,6 +117,7 @@ if test -d ${srcdir}/config/$ARCH ; then
   config_path="$ARCH"
 fi
 
+tmake_file=
 # Other system configury
 case "${target}" in
   aarch64*-*-linux*)
@@ -134,6 +135,11 @@ case "${target}" in
        config_path="${config_path} s390 posix"
        ;;
 
+  powerpc*-*-aix*)
+       config_path="${config_path} posix"
+       tmake_file="t-aix"
+       ;;
+
   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu \
   | *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly* \
   | *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11* \
index 044b34d53ccd4b72b0538ce8ced3262d7dd7e95f..7a3e29d0c71cdb5d185e149d2ae44323ec5beed2 100644 (file)
@@ -1273,7 +1273,7 @@ rs6000-ibm-aix5.1.* | powerpc-ibm-aix5.1.*)
 rs6000-ibm-aix[56789].* | powerpc-ibm-aix[56789].*)
        md_unwind_header=rs6000/aix-unwind.h
        tmake_file="t-fdpbit rs6000/t-ppc64-fp rs6000/t-slibgcc-aix rs6000/t-ibm-ldouble rs6000/t-aix-cxa"
-       extra_parts="crtcxa.o crtcxa_s.o crtdbase.o"
+       extra_parts="crtcxa.o crtcxa_s.o crtdbase.o crtcxa_64.o crtcxa_64_s.o crtdbase_64.o"
        ;;
 rl78-*-elf)
        tmake_file="$tm_file t-fdpbit rl78/t-rl78"
index d7e663866193301b476196c729bcd4cf2d7d6f65..0e1bccb15256bf9dc40824abba5fa582d3f58741 100644 (file)
@@ -8,10 +8,19 @@ LIB2ADD_ST += $(srcdir)/config/rs6000/aixinitfini.c
 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-aix-cxa.ver
 
 crtdbase.o: $(srcdir)/config/rs6000/crtdbase.S
-       $(crt_compile) -c $<
+       $(crt_compile) -maix32 -c $<
 
 crtcxa.o: $(srcdir)/config/rs6000/crtcxa.c
-       $(crt_compile) -c $<
+       $(crt_compile) -maix32 -c $<
 
 crtcxa_s.o: $(srcdir)/config/rs6000/crtcxa.c
-       $(crt_compile) -DSHARED -c $<
+       $(crt_compile) -maix32 -DSHARED -c $<
+
+crtdbase_64.o: $(srcdir)/config/rs6000/crtdbase.S
+       $(crt_compile) -maix64 -c $<
+
+crtcxa_64.o: $(srcdir)/config/rs6000/crtcxa.c
+       $(crt_compile) -maix64 -c $<
+
+crtcxa_64_s.o: $(srcdir)/config/rs6000/crtcxa.c
+       $(crt_compile) -maix64 -DSHARED -c $<
index 11db9efa0e9735b04bf26b3bc73c73d09ce6e8bc..e5f8a029ff87c1a70a502dd9a010aa502ae99136 100644 (file)
@@ -37,48 +37,44 @@ SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
 SHLIB_LINK = \
        if test svr4 != $(with_aix_soname) ; then \
          $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-bnortl -nodefaultlibs \
-         -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \
+         -Wl,-bE:@shlib_map_file@ -o shr.o \
          @multilib_flags@ @shlib_objs@ -lc \
          `case @multilib_dir@ in \
          *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \
          *) echo -lc ;; esac` ; \
-         rm -f @multilib_dir@/tmp-@shlib_base_name@.a ; \
-         $(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-@shlib_base_name@.a \
-           @multilib_dir@/shr.o ; \
-         mv @multilib_dir@/tmp-@shlib_base_name@.a \
-            @multilib_dir@/@shlib_base_name@.a ; \
-         rm -f @multilib_dir@/shr.o ; \
+         rm -f tmp-@shlib_base_name@.a ; \
+         $(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a shr.o ; \
+         mv tmp-@shlib_base_name@.a @shlib_base_name@.a ; \
+         rm -f shr.o ; \
        fi ; \
        if test aix != $(with_aix_soname) ; then \
          case @multilib_dir@ in *64*) shr='shr_64' ;; *) shr='shr' ;; esac ; \
          $(CC) $(LIBGCC2_CFLAGS) -shared -Wl,-G -nodefaultlibs \
-         -Wl,-bE:@shlib_map_file@ -o @multilib_dir@/$$shr.o \
+         -Wl,-bE:@shlib_map_file@ -o $$shr.o \
          @multilib_flags@ @shlib_objs@ -lc \
          `case @multilib_dir@ in \
          *pthread*) echo -L$(TARGET_SYSTEM_ROOT)/usr/lib/threads -lpthreads -lc_r $(TARGET_SYSTEM_ROOT)/usr/lib/libc.a ;; \
          *) echo -lc ;; esac` ; \
-         $(STRIP_FOR_TARGET) -X32_64 -e @multilib_dir@/$$shr.o ; \
+         $(STRIP_FOR_TARGET) -X32_64 -e $$shr.o ; \
          { echo "\#! $(SHLIB_SONAME)($$shr.o)" ; \
            case @multilib_dir@ in *64*) echo '\# 64' ;; *) echo '\# 32' ;; esac ; \
            cat @shlib_map_file@ ; \
-         } > @multilib_dir@/$$shr.imp ; \
-         rm -f @multilib_dir@/tmp-$(SHLIB_SONAME) ; \
-         $(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-$(SHLIB_SONAME) \
-           @multilib_dir@/$$shr.imp @multilib_dir@/$$shr.o ; \
-         mv @multilib_dir@/tmp-$(SHLIB_SONAME) \
-            @multilib_dir@/$(SHLIB_SONAME) ; \
-         rm -f @multilib_dir@/@shlib_base_name@.so ; \
-         $(LN_S) $(SHLIB_SONAME) @multilib_dir@/@shlib_base_name@.so ; \
-         rm -f @multilib_dir@/$$shr.imp @multilib_dir@/$$shr.o ; \
+         } > $$shr.imp ; \
+         rm -f tmp-$(SHLIB_SONAME) ; \
+         $(AR_CREATE_FOR_TARGET) tmp-$(SHLIB_SONAME) $$shr.imp $$shr.o ; \
+         mv tmp-$(SHLIB_SONAME) $(SHLIB_SONAME) ; \
+         rm -f @shlib_base_name@.so ; \
+         $(LN_S) $(SHLIB_SONAME) @shlib_base_name@.so ; \
+         rm -f $$shr.imp $$shr.o ; \
        fi
 SHLIB_INSTALL = \
        $(mkinstalldirs) $(DESTDIR)$(slibdir)@shlib_slibdir_qual@; \
        if test svr4 != $(with_aix_soname) ; then \
-         $(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.a \
+         $(INSTALL_DATA) @shlib_base_name@.a \
                  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/ ; \
        fi ; \
        if test aix != $(with_aix_soname) ; then \
-         $(INSTALL_DATA) @multilib_dir@/$(SHLIB_SONAME) \
+         $(INSTALL_DATA) $(SHLIB_SONAME) \
                  $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/ ; \
          rm -f $(DESTDIR)$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so ; \
          $(LN_S) $(SHLIB_SONAME) \
@@ -91,3 +87,36 @@ SHLIB_NM_FLAGS = -Bpg -X32_64
 
 # Either 32-bit and 64-bit objects in archives.
 AR_FLAGS_FOR_TARGET = -X32_64
+
+# Build and install AIX-style FAT libraries
+ifeq ($(MULTIBUILDTOP),)
+BITS=$(shell if test -z "`ar -X64 t libgcc_s.a`" ; then \
+    echo '64'; else echo '32'; fi)
+all: all-multi
+ifeq ($(enable_shared),yes)
+       ar -X$(BITS) x ../ppc$(BITS)/libgcc/libgcc_s.a shr.o
+       ar -X$(BITS) rc ./libgcc_s.a shr.o
+       rm -f shr.o
+       ar -X$(BITS) x ../pthread/ppc$(BITS)/libgcc/libgcc_s.a shr.o
+       ar -X$(BITS) rc ../pthread/libgcc/libgcc_s.a shr.o
+       rm -f shr.o
+endif
+       ar -X$(BITS) rc libgcc.a \
+           $(addprefix ../ppc$(BITS)/libgcc/,$(libgcc-objects))
+       ar -X$(BITS) rc libgcc_eh.a \
+           $(addprefix ../ppc$(BITS)/libgcc/,$(libgcc-eh-objects))
+       ar -X$(BITS) rc ../pthread/libgcc/libgcc.a \
+           $(addprefix ../pthread/ppc$(BITS)/libgcc/,$(libgcc-objects))
+       ar -X$(BITS) rc ../pthread/libgcc/libgcc_eh.a \
+           $(addprefix ../pthread/ppc$(BITS)/libgcc/,$(libgcc-eh-objects))
+ifeq ($(enable_gcov),yes)
+       ar -X$(BITS) rc libgcov.a \
+           $(addprefix ../ppc$(BITS)/libgcc/,$(libgcov-objects))
+       ar -X$(BITS) rc ../pthread/libgcc/libgcov.a \
+           $(addprefix ../pthread/ppc$(BITS)/libgcc/,$(libgcov-objects))
+endif
+       $(MAKE) install-leaf DESTDIR=$(gcc_objdir) \
+           slibdir= libsubdir= MULTIOSDIR=$(MULTIDIR)
+       cp ../pthread/libgcc/libgcc_s.a ../../gcc/pthread/
+       cp ../pthread/libgcc/libgcc_eh.a ../../gcc/pthread/
+endif
index a8a2191acc30cf108ef8ea15ab6f55b25fb0b2b6..69e94eea550ca97925d850eabbe1b415c506e05c 100644 (file)
@@ -1236,4 +1236,9 @@ endif
 
 EXTRA_DIST = $(m4_files)
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 include $(top_srcdir)/../multilib.am
index 312a682b45dce8f180f1c9ac55f98a96a02a6512..1de35db54beb667d476be44c815ad473b606864c 100644 (file)
@@ -707,6 +707,7 @@ target_noncanonical = @target_noncanonical@
 target_os = @target_os@
 target_subdir = @target_subdir@
 target_vendor = @target_vendor@
+tmake_file = @tmake_file@
 toolexecdir = @toolexecdir@
 toolexeclibdir = @toolexeclibdir@
 top_build_prefix = @top_build_prefix@
@@ -7190,6 +7191,11 @@ fpu-target.inc: fpu-target.h $(srcdir)/libgfortran.h
 @MAINTAINER_MODE_TRUE@$(gfor_misc_specifics): m4/misc_specifics.m4 m4/head.m4
 @MAINTAINER_MODE_TRUE@ $(M4) -Dfile=$@ -I$(srcdir)/m4 misc_specifics.m4 > $@
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 # GNU Make needs to see an explicit $(MAKE) variable in the command it
 # runs to enable its job server during parallel builds.  Hence the
 # comments below.
diff --git a/libgfortran/config/t-aix b/libgfortran/config/t-aix
new file mode 100644 (file)
index 0000000..7046aee
--- /dev/null
@@ -0,0 +1,10 @@
+ifeq ($(MULTIBUILDTOP),)
+BITS=$(shell if test -z "`ar -X64 t .libs/$(PACKAGE).a`" ; then \
+    echo '64'; else echo '32'; fi)
+#MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
+MAJOR=5
+all-local:
+       ar -X$(BITS) rc .libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+       ar -X$(BITS) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+endif
+
index 195f8bbce4c8f8b07e9c9d06e19021e9c83afcaa..854656960c4c6fe2e44c29f16da54c00e240d7c9 100755 (executable)
@@ -639,6 +639,7 @@ LIBOBJS
 get_gcc_base_ver
 HAVE_AVX128_FALSE
 HAVE_AVX128_TRUE
+tmake_file
 IEEE_FLAGS
 IEEE_SUPPORT
 IEEE_SUPPORT_FALSE
@@ -12723,7 +12724,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12726 "configure"
+#line 12727 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12829,7 +12830,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12832 "configure"
+#line 12833 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 IEEE_FLAGS="${ieee_flags}"
 
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+
+
 
 # Check for POSIX getpwuid_r
 #
index 711dc60ff78e97c13b3b86db69e2aa2b2d290b76..4109d0fefae12884759eb91d55ae6180d5a0d821 100644 (file)
@@ -601,6 +601,18 @@ AC_SUBST(IEEE_SUPPORT)
 IEEE_FLAGS="${ieee_flags}"
 AC_SUBST(IEEE_FLAGS)
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+AC_SUBST(tmake_file)
+
 
 # Check for POSIX getpwuid_r 
 #
index 5824f253e2f18ea7a019256d8ca1c54b950aa5a3..e9d92c9d34dd2f3a2fdba5d97c6ab6ffce1b06ad 100644 (file)
@@ -15,6 +15,9 @@
 # It sets the following shell variables:
 #
 #   fpu_host            FPU-specific code file, defaults to fpu-generic.
+#   tmake_file         A list of machine-description-specific
+#                      makefile fragments.
+
 
 
 # DEFAULTS
@@ -57,3 +60,18 @@ case "${host_cpu}" in
   sh*)
     ieee_flags="-mieee" ;;
 esac
+
+tmake_file=
+# Other system configury
+case "${target}" in
+
+  *-*-aix*)
+       # Create AIX-style "FAT" libraries.
+       tmake_file="t-aix"
+       ;;
+
+  *)
+       ;;
+
+esac
+
index b84156291e8c01cd6dd989decb6d20c3c3258301..16b6995694969e7fcdd6f23fcde47282fa67f3a9 100644 (file)
@@ -141,4 +141,9 @@ stamp-build-info: libgomp.texi
 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
 MAINTAINERCLEANFILES = $(srcdir)/libgomp.info
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 include $(top_srcdir)/../multilib.am
index 5ff2ac14db916a60f1c221d941ac98adcfb04fae..5455951cdedc3adecb389fcd065f922fa9f493c6 100644 (file)
@@ -16,7 +16,7 @@
 
 # Plugins for offload execution, Makefile.am fragment.
 #
-# Copyright (C) 2014-2019 Free Software Foundation, Inc.
+# Copyright (C) 2014-2020 Free Software Foundation, Inc.
 #
 # Contributed by Mentor Embedded.
 #
@@ -530,6 +530,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
+tmake_file = @tmake_file@
 toolexecdir = @toolexecdir@
 toolexeclibdir = @toolexeclibdir@
 top_build_prefix = @top_build_prefix@
@@ -573,8 +574,8 @@ libgomp_la_SOURCES = alloc.c atomic.c barrier.c critical.c env.c \
        affinity.c target.c splay-tree.c libgomp-plugin.c \
        oacc-parallel.c oacc-host.c oacc-init.c oacc-mem.c \
        oacc-async.c oacc-plugin.c oacc-cuda.c priority_queue.c \
-       affinity-fmt.c teams.c allocator.c oacc-profiling.c oacc-target.c \
-       $(am__append_4)
+       affinity-fmt.c teams.c allocator.c oacc-profiling.c \
+       oacc-target.c $(am__append_4)
 
 # Nvidia PTX OpenACC plugin.
 @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_version_info = -version-info $(libtool_VERSION)
@@ -1438,6 +1439,11 @@ stamp-build-info: libgomp.texi
        $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -o libgomp.info $(srcdir)/libgomp.texi
        @touch $@
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 # GNU Make needs to see an explicit $(MAKE) variable in the command it
 # runs to enable its job server during parallel builds.  Hence the
 # comments below.
diff --git a/libgomp/config/t-aix b/libgomp/config/t-aix
new file mode 100644 (file)
index 0000000..5d0b7e0
--- /dev/null
@@ -0,0 +1,9 @@
+ifeq ($(MULTIBUILDTOP),)
+BITS=$(shell if test -z "`ar -X64 t .libs/$(PACKAGE).a`" ; then \
+    echo '64'; else echo '32'; fi)
+MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
+all-local:
+       ar -X$(BITS) rc .libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+       ar -X$(BITS) rc ../pthread/$(PACKAGE)/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)/.libs/$(PACKAGE).so.$(MAJOR)
+endif
+
index 9ffa66c18d9f651464ebea2be859c693344aa3f7..fd65828136d80d80753e22fa5e6cec88f7f04d4c 100755 (executable)
@@ -650,6 +650,7 @@ OMP_LOCK_SIZE
 USE_FORTRAN_FALSE
 USE_FORTRAN_TRUE
 link_gomp
+tmake_file
 XLDFLAGS
 XCFLAGS
 config_path
@@ -11432,7 +11433,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11435 "configure"
+#line 11436 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11538,7 +11539,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11541 "configure"
+#line 11542 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16747,6 +16748,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5
 $as_echo_n "checking for CET support... " >&6; }
 
+# NB: Avoid nested save_CFLAGS and save_LDFLAGS.
 case "$host" in
   i[34567]86-*-linux* | x86_64-*-linux*)
     case "$enable_cet" in
@@ -16822,6 +16824,18 @@ FCFLAGS="$FCFLAGS $CET_FLAGS"
 
 
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+
+
 # Cleanup and exit.
 CFLAGS="$save_CFLAGS"
 cat >confcache <<\_ACEOF
index ef5d293c31e99abf5e069166d38bd3cf71f235fa..201d26fff7ae01f50ce7fd4a1b6290f6ee5e8204 100644 (file)
@@ -348,6 +348,18 @@ AC_SUBST(config_path)
 AC_SUBST(XCFLAGS)
 AC_SUBST(XLDFLAGS)
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+AC_SUBST(tmake_file)
+
 # Cleanup and exit.
 CFLAGS="$save_CFLAGS"
 AC_CACHE_SAVE
index 4790a31e394903489a63385afc5c9da4f3c49bfd..1863287fa0d4f66cbb4c2421808e4208bdf9e50c 100644 (file)
@@ -9,6 +9,8 @@
 #                      config subdirectory of the source tree.
 #  XCFLAGS             Add extra compile flags to use.
 #  XLDFLAGS            Add extra link flags to use.
+#  tmake_file          A list of machine-description-specific
+#                      makefile fragments.
 
 # Optimize TLS usage by avoiding the overhead of dynamic allocation.
 if test $gcc_cv_have_tls = yes ; then
@@ -30,6 +32,7 @@ if test $gcc_cv_have_tls = yes ; then
   esac
 fi
 
+tmake_file=
 # Since we require POSIX threads, assume a POSIX system by default.
 config_path="posix"
 
@@ -154,6 +157,8 @@ case "${target}" in
        XLDFLAGS="${XLDFLAGS} -lpthread"
        # AIX needs -frandom-seed for bootstrap compare.
        XCFLAGS="${XCFLAGS} -frandom-seed=\$@"
+       # Create AIX-style "FAT" libraries.
+       tmake_file="t-aix"
        ;;
 
   nvptx*-*-*)
index da021ec70748703925585bdc1839e3f5c7373364..62c2c324082885a88b7dc8c85b8c220c9e899c06 100644 (file)
@@ -173,4 +173,9 @@ AM_MAKEFLAGS = \
 # Subdir rules rely on $(FLAGS_TO_PASS)
 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 include $(top_srcdir)/../multilib.am
index 8f11aaf2810d98667fa5f498558c128f1d9834f2..e8987d45916e69cbd6989282a8aaa713080f0c42 100644 (file)
@@ -377,6 +377,7 @@ target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
 thread_header = @thread_header@
+tmake_file = @tmake_file@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
@@ -817,6 +818,11 @@ install-dvi:
 # automake-generated TAGS rule. Make a simple one here.
 TAGS: tags-recursive $(LISP)
 
+# target overrides
+ifneq ($(tmake_file),)
+include $(tmake_file)
+endif
+
 # GNU Make needs to see an explicit $(MAKE) variable in the command it
 # runs to enable its job server during parallel builds.  Hence the
 # comments below.
diff --git a/libstdc++-v3/config/os/aix/t-aix b/libstdc++-v3/config/os/aix/t-aix
new file mode 100644 (file)
index 0000000..a588746
--- /dev/null
@@ -0,0 +1,9 @@
+ifeq ($(MULTIBUILDTOP),)
+BITS=$(shell if test -z "`ar -X64 t src/.libs/$(PACKAGE).a`" ; then \
+    echo '64'; else echo '32'; fi)
+MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
+all-local:
+       ar -X$(BITS) rc src/.libs/$(PACKAGE).a ../ppc$(BITS)/$(PACKAGE)-v3/src/.libs/$(PACKAGE).so.$(MAJOR)
+       ar -X$(BITS) rc ../pthread/$(PACKAGE)-v3/src/.libs/$(PACKAGE).a ../pthread/ppc$(BITS)/$(PACKAGE)-v3/src/.libs/$(PACKAGE).so.$(MAJOR)
+endif
+
index 4ef678e001ed160587cb7fe27a08c618a2dd8640..dd54bd406a9a341c1c69bc561652904b33021b39 100755 (executable)
@@ -643,6 +643,7 @@ glibcxx_toolexecdir
 gxx_include_dir
 glibcxx_prefixdir
 EXTRA_CFLAGS
+tmake_file
 CPU_OPT_BITS_RANDOM
 CPU_OPT_EXT_RANDOM
 ERROR_CONSTANTS_SRCDIR
@@ -12059,7 +12060,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12062 "configure"
+#line 12063 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12165,7 +12166,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12168 "configure"
+#line 12169 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -15857,7 +15858,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; }
   # Fake what AC_TRY_COMPILE does.
 
     cat > conftest.$ac_ext << EOF
-#line 15860 "configure"
+#line 15861 "configure"
 int main()
 {
   typedef bool atomic_type;
@@ -15892,7 +15893,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15895 "configure"
+#line 15896 "configure"
 int main()
 {
   typedef short atomic_type;
@@ -15927,7 +15928,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15930 "configure"
+#line 15931 "configure"
 int main()
 {
   // NB: _Atomic_word not necessarily int.
@@ -15963,7 +15964,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 15966 "configure"
+#line 15967 "configure"
 int main()
 {
   typedef long long atomic_type;
@@ -16116,7 +16117,7 @@ $as_echo "mutex" >&6; }
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 16119 "configure"
+#line 16120 "configure"
 int main()
 {
   _Decimal32 d1;
@@ -16158,7 +16159,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   # unnecessary for this test.
 
     cat > conftest.$ac_ext << EOF
-#line 16161 "configure"
+#line 16162 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -16192,7 +16193,7 @@ $as_echo "$enable_int128" >&6; }
     rm -f conftest*
 
     cat > conftest.$ac_ext << EOF
-#line 16195 "configure"
+#line 16196 "configure"
 template<typename T1, typename T2>
   struct same
   { typedef T2 type; };
@@ -77719,6 +77720,17 @@ CPU_OPT_BITS_RANDOM=config/${cpu_opt_bits_random}
 
 
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+
 
 # Add CET specific flags if Intel CET is enabled.
  # Check whether --enable-cet was given.
index 699e55fd829d40b464bf62e920418eec5da6356d..ffd0079613fee466f4fb1b0a6ab5e6c429cd7ca1 100644 (file)
@@ -528,6 +528,17 @@ AC_SUBST(ERROR_CONSTANTS_SRCDIR)
 AC_SUBST(CPU_OPT_EXT_RANDOM)
 AC_SUBST(CPU_OPT_BITS_RANDOM)
 
+# Conditionalize the makefile for this target machine.
+tmake_file_=
+for f in ${tmake_file}
+do
+       if test -f ${srcdir}/config/$f
+       then
+               tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+       fi
+done
+tmake_file="${tmake_file_}"
+AC_SUBST(tmake_file)
 
 # Add CET specific flags if Intel CET is enabled.
 GCC_CET_FLAGS(CET_FLAGS)
index 898db37d9a22a872a62fe6c7ae02c1955b0b66f6..8d1b60804f3dfad0dd36777577b5aae519b690c4 100644 (file)
@@ -70,6 +70,9 @@
 #                          additional symbols to export from the shared
 #                          library, when symbol versioning is in use
 #
+#   tmake_file            A list of machine-description-specific
+#                         makefile fragments.
+#
 #
 # If the defaults will not work for your platform, you need only change the
 # variables that won't work, i.e., you do not need to explicitly set a
@@ -91,6 +94,7 @@ try_cpu=generic
 abi_baseline_subdir_switch=--print-multi-directory
 abi_tweaks_dir="cpu/generic"
 error_constants_dir="os/generic"
+tmake_file=
 
 # HOST-SPECIFIC OVERRIDES
 # Set any CPU-dependent bits.
@@ -206,17 +210,7 @@ case "${host_os}" in
     # Newer versions of AIX only support PowerPC architecture, so use
     # atomic instructions directly.
     os_include_dir="os/aix"
-    ;;
-  aix4.[3456789]*)
-    # We set os_include_dir to os/aix only on AIX 4.3 and newer, but
-    # os/aix/atomicity.h works on earlier versions of AIX 4.*, so we
-    # explicitly duplicate the directory for 4.[<3].
-    os_include_dir="os/aix"
-    atomicity_dir="os/aix"
-    ;;
-  aix4.*)
-    os_include_dir="os/generic"
-    atomicity_dir="os/aix"
+    tmake_file="os/aix/t-aix"
     ;;
   aix*)
     os_include_dir="os/generic"