diff options
author | David Edelsohn <dje.gcc@gmail.com> | 2020-05-15 17:46:08 -0400 |
---|---|---|
committer | David Edelsohn <dje.gcc@gmail.com> | 2020-06-21 14:14:46 -0400 |
commit | 47ddb895df311e546a6f54345e18b8749ac50324 (patch) | |
tree | 0b30e4df51b10fe25ab50b0119daeebd2c99ac6d /libgfortran | |
parent | 8ee2640bfdc62f835ec9740278f948034bc7d9f1 (diff) | |
download | gcc-47ddb895df311e546a6f54345e18b8749ac50324.zip gcc-47ddb895df311e546a6f54345e18b8749ac50324.tar.gz gcc-47ddb895df311e546a6f54345e18b8749ac50324.tar.bz2 |
aix: Add GCC64 configuration and FAT target libraries.
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.
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/Makefile.am | 5 | ||||
-rw-r--r-- | libgfortran/Makefile.in | 6 | ||||
-rw-r--r-- | libgfortran/config/t-aix | 10 | ||||
-rwxr-xr-x | libgfortran/configure | 17 | ||||
-rw-r--r-- | libgfortran/configure.ac | 12 | ||||
-rw-r--r-- | libgfortran/configure.host | 18 |
6 files changed, 66 insertions, 2 deletions
diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am index a8a2191..69e94ee 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am @@ -1236,4 +1236,9 @@ endif EXTRA_DIST = $(m4_files) +# target overrides +ifneq ($(tmake_file),) +include $(tmake_file) +endif + include $(top_srcdir)/../multilib.am diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in index 312a682..1de35db 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in @@ -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 index 0000000..7046aee --- /dev/null +++ b/libgfortran/config/t-aix @@ -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 + diff --git a/libgfortran/configure b/libgfortran/configure index 195f8bb..8546569 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -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 @@ -26533,6 +26534,18 @@ fi 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 # diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac index 711dc60..4109d0f 100644 --- a/libgfortran/configure.ac +++ b/libgfortran/configure.ac @@ -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 # diff --git a/libgfortran/configure.host b/libgfortran/configure.host index 5824f25..e9d92c9 100644 --- a/libgfortran/configure.host +++ b/libgfortran/configure.host @@ -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 + |