Installation stuff.
[official-gcc.git] / INSTALL / configure.html
blob29b0b860c7fed5cd5a025288bdf79b8c35744bc8
1 <html>
2 <head>
3 <title>Configuring egcs-1.00 </title>
4 </head>
5 <body bgcolor="white">
6 <h1 align="center">Configuring egcs-1.00</h1>
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.
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.
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.
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.
25 <p>To configure egcs:
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>
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.
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>
48 <p><b> options specification</b>
50 <p>Use <b>options</b> to override several configure time options for
51 egcs. A partial list of supported <tt>options</tt>:
53 <ul>
54 <li> <tt>--prefix=</tt><i>dirname</i> -- Specify the toplevel installation directory;
55 /usr/local is the default prefix. This is the recommended way to install
56 the tools into a directory other than the default.
58 <br>These additional options control where certain parts of the distribution
59 are installed. Normally you should not need to use these options.
60 <ul>
61 <li> <tt>--with-local-prefix=</tt><i>dirname</i> -- Specify the installation
62 directory for local include files. The default is /usr/local.
64 <li> <tt>--with-gxx-include-dir=</tt><i>dirname</i> -- Specify the installation
65 directory for g++ header files. The default is /usr/local/include/g++.
66 </ul>
68 <li> <tt>--enable-shared</tt> -- Build shared libraries if supported
69 <tt>--disable-shared</tt> is the default.
71 <li> <tt>--enable-haifa</tt> -- Enable the new Haifa instruction scheduler in the
72 compiler; the new scheduler can significantly improve code on some targets.
73 <tt>--disable-haifa</tt> is currently the default on all platforms except the HPPA.
75 <li> <tt>--with-gnu-as</tt> -- Specify that the compiler should assume the GNU
76 assembler (aka gas) is available.
78 <li> <tt>--with-gnu-ld</tt> -- Specify that the compiler should assume the GNU
79 linker (aka gld) is available.
81 <li> <tt>--with-stabs</tt> -- Specify that stabs debugging information should be used
82 instead of whatever format the host normally uses. Normally GCC uses the
83 same debug format as the host system.
85 <li> <tt>--enable-multilib</tt> -- Specify that multiple libraries should be built
86 to support different target variants, calling conventions, etc. This
87 is the default.
89 <li> <tt>--enable-threads</tt> -- Specify that the target supports threads.
91 <li> <tt>--enable-threads=</tt><i>lib</i> -- Specify that <i>lib</i> is the thread
92 support library.
94 <li> <tt>--with-cpu=</tt><i>cpu</i> -- Specify which cpu variant the compiler should
95 generate code for by default. This is currently only supported on the
96 RS6000/PowerPC ports.
97 </ul>
99 <p>Some options which only apply to building cross compilers:
100 <ul>
101 <li> <tt>--with-headers=</tt><i>dir</i> -- Specifies a directory which has target
102 include files.
103 <li> <tt>--with-libs=</tt><i>dirs</i> -- Specifies a list of directories which contain
104 the target runtime libraries.
105 <li> <tt>--with-newlib</tt> -- Specifies that "newlib" is being used as the target
106 C library. This causes __eprintf to be omitted from libgcc.a on the
107 assumption that it will be provided by newlib.
108 </ul>
110 <p>Note that each <tt>--enable</tt> option has a corresponding <tt>--disable</tt> option and
111 that each <tt>--with</tt> option has a corresponding <tt>--without</tt> option.
115 <hr>
116 <i>Last modified on December 1, 1997.</i>
118 </body>
119 </html>