Hi David,
thanks for working on this!
David Edelsohn <dje....@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).
I haven’t tried to implement the FAT CRTs so far - but I suspect that those
are
going to use simple linear rules.
thanks
Iain
====
ifeq ($(MULTIBUILDTOP),)
MAJOR=$(firstword $(subst :, ,$(libtool_VERSION)))
OTHER=$(shell for d in $(MULTIDIRS); do echo
"../$$d/$(PACKAGE)-v3/src/.libs/$(PACKAGE).$(MAJOR).dylib "; done)
all-local:
lipo -create -output src/.libs/$(PACKAGE).$(MAJOR).f.dylib
src/.libs/$(PACKAGE).$(MAJOR).dylib $(OTHER)
mv src/.libs/$(PACKAGE).$(MAJOR).f.dylib
src/.libs/$(PACKAGE).$(MAJOR).dylib
endif