This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: committed: merge with libada-branch
- From: Ian Lance Taylor <ian at wasabisystems dot com>
- To: Laurent GUERBY <laurent at guerby dot net>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Arnaud Charlet <charlet at ACT-Europe dot FR>, gcc at gcc dot gnu dot org
- Date: 10 Feb 2004 15:49:17 -0500
- Subject: Re: committed: merge with libada-branch
- References: <20040210115744.A25558@dublin.act-europe.fr><87r7x2yexs.fsf@egil.codesourcery.com> <1076441795.22422.112.camel@pc><877jyuyahq.fsf@egil.codesourcery.com> <1076445684.22422.134.camel@pc>
Laurent GUERBY <laurent@guerby.net> writes:
> > There is brief documentation of how to specify a set of multilibs in
> > the GCC internals manual, but I don't know of any documentation
> > anywhere of how to write a multilib-enabled language runtime Makefile.
> >
> > The set of multilibs is determined entirely by the target
> > architecture. Building a cross compiler to just about any
> > embedded target (mips-elf for example) will involve multilibs.
>
> Are multilib used to build shared and non shared libraries?
No, multilibs are used to build different variants of libraries for
different purposes. A simple example is building libraries for both
big- and little-endian code. gcc will then select the right set of
libraries when linking, depending upon the command line options.
libgcc.a is built using multilibs, and so is libstdc++.
These days, libgcc is built using gcc/mklibgcc.in. That script is
used to build a Makefile (libgcc.mk) which explicitly lists the
multilib variants for each generated file.
libstdc++ is built using config-ml.in at top level. That script
basically walks through the output of gcc --print-multi-lib and builds
the library in a different subdirectory for each variant.
Now that gcc requires GNU make, it might be possible to write some
hairy GNU Makefile which uses gcc --print-multi-lib to decide what to
build.
Ian