source: trunk/src/gcc/config-ml.in@ 699

Last change on this file since 699 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 23.4 KB
Line 
1# Configure fragment invoked in the post-target section for subdirs
2# wanting multilib support.
3#
4# It is advisable to support a few --enable/--disable options to let the
5# user select which libraries s/he really wants.
6#
7# Subdirectories wishing to use multilib should put the following lines
8# in the "post-target" section of configure.in.
9#
10# if [ "${srcdir}" = "." ] ; then
11# if [ "${with_target_subdir}" != "." ] ; then
12# . ${with_multisrctop}../../config-ml.in
13# else
14# . ${with_multisrctop}../config-ml.in
15# fi
16# else
17# . ${srcdir}/../config-ml.in
18# fi
19#
20#
21# Things are complicated because 6 separate cases must be handled:
22# 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6.
23#
24# srcdir=. is special. It must handle make programs that don't handle VPATH.
25# To implement this, a symlink tree is built for each library and for each
26# multilib subdir.
27#
28# The build tree is layed out as
29#
30# ./
31# newlib
32# m68020/
33# newlib
34# m68881/
35# newlib
36#
37# The nice feature about this arrangement is that inter-library references
38# in the build tree work without having to care where you are. Note that
39# inter-library references also work in the source tree because symlink trees
40# are built when srcdir=.
41#
42# Unfortunately, trying to access the libraries in the build tree requires
43# the user to manually choose which library to use as GCC won't be able to
44# find the right one. This is viewed as the lesser of two evils.
45#
46# Configure variables:
47# ${with_target_subdir} = "." for native, or ${target_alias} for cross.
48# Set by top level Makefile.
49# ${with_multisrctop} = how many levels of multilibs there are in the source
50# tree. It exists to handle the case of configuring in the source tree:
51# ${srcdir} is not constant.
52# ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881).
53#
54# Makefile variables:
55# MULTISRCTOP = number of multilib levels in source tree (+1 if cross)
56# (FIXME: note that this is different than ${with_multisrctop}. Check out.).
57# MULTIBUILDTOP = number of multilib levels in build tree
58# MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...)
59# (only defined in each library's main Makefile).
60# MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000)
61# (only defined in each multilib subdir).
62
63# FIXME: Multilib is currently disabled by default for everything other than
64# newlib. It is up to each target to turn on multilib support for the other
65# libraries as desired.
66
67# We have to handle being invoked by both Cygnus configure and Autoconf.
68#
69# Cygnus configure incoming variables:
70# srcdir, subdir, host, arguments
71#
72# Autoconf incoming variables:
73# srcdir, host, ac_configure_args
74#
75# We *could* figure srcdir and host out, but we'd have to do work that
76# our caller has already done to figure them out and requiring these two
77# seems reasonable.