This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: committed: merge with libada-branch


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]