[PATCH] FAT library support for libatomic, libgfortran, libgomp, libstdc++

David Edelsohn dje.gcc@gmail.com
Wed Jun 3 19:49:40 GMT 2020


On Wed, Jun 3, 2020 at 3:14 PM Iain Sandoe <idsandoe@googlemail.com> wrote:
>
> Hi David,
>
> thanks for working on this!
>
> David Edelsohn <dje.gcc@gmail.com> wrote:
>
> > [I'll start by repeating what I wrote about a similar libgcc change to
> > provide background and context.]
> >
> > When AIX added 64 bit support, it implemented what Apple MacOS Darwin
> > calls "FAT" libraries for its equivalent functionality -- both 32 bit
> > and 64 bit objects (or shared objects) are co-located in the same
> > archive.  GCC on AIX historically has followed the GCC multilib
> > directory hierarchy approach with separate directories and archives
> > for each multilib.
>
> End-user builds of GCC on Darwin also currently follow the “GCC multilib”
> pattern;  However when and where GCC libraries were installed by Apple
> they are already FAT versions (built outside the GCC build system).
>
> … which fortuitously means that a FAT GCC library set is compatible with
> the existing system implementations.
>
> Of course that’s an initial reaction - and I/We will need to discuss with the
> ‘downstreams’ (macports, fink, homebrew) as to whether a switch needs
> some transition - or would cause problems.
>
> Given we anticipate a confiuration flag to disable this mode, it seems we
> can cover most reasonable concerns.
>
> > libstdc++-v3/
> >        * 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.
> >        * empty.mk: New file.
>
> As a “proof of principle, quick hack” I used the following fragment for
> libstdc++
> on Darwin; this means that the same fragment would work for X86 and PPC
> - and (in principle) would work for as many sub-archs as we elected to build.
>
> My only concern in the short-term is about dependencies; is it defined that
> the MULTIBUILDTOP case cannot be active until all the deps are built?
>
> (the libgcc_s case for Darwin which is already FAT is more complex but does
>   have rules for the components to be built first).

Hi, Ian

Thanks for trying this out and the feedback.

On AIX I can start building the "FAT" libraries without actually
relying upon them for more than the "native" objects.  So I slowly can
create 32/64 bit compatible libraries and then enable the multilib
configuration bits at the end to instruct GCC to look at the same
directory level for both 32 bit and 64 bit objects.  I don't know if
that is viable for Darwin.

And on AIX I cannot transition for some libraries and not others.  In
other words, I can't switch C++ and Fortran, but not Objective-C and
GCCGo.

Thanks, David


More information about the Libstdc++ mailing list