OSDN Git Service

ff26b384b9cd233eac454d51b273aa3fe3740ed2
[pf3gnuchains/gcc-fork.git] / INSTALL / configure.html
1 <html>
2 <head>
3 <title>Configuring egcs-1.0 </title>
4 </head>
5 <body bgcolor="white">
6 <h1 align="center">Configuring egcs-1.0</h1>
7
8 <p>Like most GNU software, egcs must be configured before it can be built.
9 This document attempts to describe the recommended configuration procedure
10 for both native and cross targets.
11
12 <p>We use <i>srcdir</i> to refer to the toplevel source directory for
13 egcs; we use <i>objdir</i> to refer to the toplevel build/object
14 directory for egcs.
15
16 <p>First, we <b>highly</b> recommend that egcs be built into a separate
17 directory than the sources.  This is how we generally build egcs; building
18 where <i>srcdir</i> == <i>objdir</i> should still work, but doesn't get
19 extensive testing.
20
21 <p>Second, when configuring a native system, either "cc" must be in your
22 path or you must set CC in your environment before running configure.
23 Otherwise the configuration scripts may fail.
24
25 <p>To configure egcs:
26
27 <blockquote>
28 <tt>
29   <br>% mkdir <i>objdir</i>
30   <br>% cd <i>objdir</i>
31   <br>% <i>srcdir</i>/configure <b>[target]</b> <b>[options]</b>
32 </tt>
33 </blockquote>
34
35
36 <p><b>target specification</b>
37 <ul>
38   <li> egcs has code to correctly determine the correct value for
39   <b>target</b> for nearly all native systems.  Therefore, we highly
40   recommend you not provide a configure target when configuring a
41   native compiler.
42
43   <li> <b>target</b> must be specified when configuring a cross compiler;
44   examples of valid targets would be i960-rtems, m68k-coff, sh-elf, etc.
45 </ul>
46
47
48 <p><b> options specification</b>
49
50 <p>Use <b>options</b> to override several configure time options for
51 egcs.  A partial list of supported <tt>options</tt>:
52
53 <ul>
54   <li> <tt>--prefix=</tt><i>dirname</i> -- Specify the toplevel installation
55   directory.  This is the recommended way to install the tools into a directory
56   other than the default.  The toplevel installation directory defaults to
57   /usr/local.
58
59   <br>These additional options control where certain parts of the distribution
60   are installed.  Normally you should not need to use these options.
61   <ul>
62      <li> <tt>--with-local-prefix=</tt><i>dirname</i> -- Specify the installation
63      directory for local include files.  The default is /usr/local.
64
65      <li> <tt>--with-gxx-include-dir=</tt><i>dirname</i> -- Specify the installation
66      directory for g++ header files.  The default is /usr/local/include/g++.
67   </ul>
68
69   <li> <tt>--enable-shared</tt> -- Build shared versions of the C++ runtime
70   libraries if supported <tt>--disable-shared</tt> is the default.
71
72   <li> <tt>--enable-haifa</tt> -- Enable the new Haifa instruction scheduler in the
73   compiler; the new scheduler can significantly improve code on some targets.
74   <tt>--disable-haifa</tt> is currently the default on all platforms except the HPPA.
75
76   <li> <tt>--with-gnu-as</tt> -- Specify that the compiler should assume the GNU
77   assembler (aka gas) is available. 
78
79   <li> <tt>--with-gnu-ld</tt> -- Specify that the compiler should assume the GNU
80   linker (aka gld) is available. 
81
82   <li> <tt>--with-stabs</tt> -- Specify that stabs debugging information should be used
83   instead of whatever format the host normally uses.  Normally GCC uses the
84   same debug format as the host system. 
85
86   <li> <tt>--enable-multilib</tt> -- Specify that multiple target libraries
87   should be built to support different target variants, calling conventions,
88   etc.  This is the default. 
89
90   <li> <tt>--enable-threads</tt> -- Specify that the target supports threads.
91   This only effects the Objective-C compiler and runtime library.
92
93   <li> <tt>--enable-threads=</tt><i>lib</i> -- Specify that <i>lib</i> is the
94   thread support library.  This only effects the Objective-C compiler  and
95   runtime library.
96
97   <li> <tt>--with-cpu=</tt><i>cpu</i> -- Specify which cpu variant the compiler should
98   generate code for by default.  This is currently only supported on the
99   RS6000/PowerPC ports.
100 </ul>
101
102 <p>Some options which only apply to building cross compilers:
103 <ul>
104   <li> <tt>--with-headers=</tt><i>dir</i> -- Specifies a directory which has target
105   include files.
106   <li> <tt>--with-libs=</tt><i>dirs</i> -- Specifies a list of directories which contain
107   the target runtime libraries.
108   <li> <tt>--with-newlib</tt> -- Specifies that "newlib" is being used as the target
109   C library.   This causes __eprintf to be omitted from libgcc.a on the
110   assumption that it will be provided by newlib.
111 </ul>
112  
113 <p>Note that each <tt>--enable</tt> option has a corresponding <tt>--disable</tt> option and
114 that each <tt>--with</tt> option has a corresponding <tt>--without</tt> option.
115
116
117 <p>
118 <hr>
119 <i>Last modified on December 2, 1997.</i>
120
121 </body>
122 </html>