Installation stuff.
[official-gcc.git] / INSTALL / CONFIGURE
blob07bee0bdd69b99ce9d3ff33ae70bbd08d2dd529c
1 Configuring egcs-1.00
3 Like most GNU software, egcs must be configured before it can be built. This
4 document attempts to describe the recommended configuration procedure for
5 both native and cross targets. 
7 We use srcdir to refer to the toplevel source directory for egcs; we use objdir
8 to refer to the toplevel build/object directory for egcs. 
10 First, we highly recommend that egcs be built into a separate directory than the
11 sources. This is how we generally build egcs; building where srcdir == objdir
12 should still work, but doesn't get extensive testing. 
14 Second, when configuring a native system, either "cc" must be in your path or
15 you must set CC in your environment before running configure. Otherwise the
16 configuration scripts may fail. 
18 To configure egcs: 
20      % mkdir objdir 
21      % cd objdir 
22      % srcdir/configure [target] [options] 
24 target specification 
26      egcs has code to correctly determine the correct value for target for
27      nearly all native systems. Therefore, we highly recommend you not
28      provide a configure target when configuring a native compiler. 
29      target must be specified when configuring a cross compiler; examples of
30      valid targets would be i960-rtems, m68k-coff, sh-elf, etc. 
32 options specification 
34 Use options to override several configure time options for egcs. A partial list
35 of supported options: 
37    * --prefix=dirname -- Specify the toplevel installation directory;
38      /usr/local is the default prefix. This is the recommended way to install
39      the tools into a directory other than the default. 
40      These additional options control where certain parts of the distribution
41      are installed. Normally you should not need to use these options. 
42          --with-local-prefix=dirname -- Specify the installation
43          directory for local include files. The default is /usr/local. 
44          --with-gxx-include-dir=dirname -- Specify the installation
45          directory for g++ header files. The default is
46          /usr/local/include/g++. 
48    * --enable-shared -- Build shared libraries if supported
49      --disable-shared is the default. 
51    * --enable-haifa -- Enable the new Haifa instruction scheduler in the
52      compiler; the new scheduler can significantly improve code on some
53      targets. --disable-haifa is currently the default on all platforms
54      except the HPPA. 
56    * --with-gnu-as -- Specify that the compiler should assume the GNU
57      assembler (aka gas) is available. 
59    * --with-gnu-ld -- Specify that the compiler should assume the GNU
60      linker (aka gld) is available. 
62    * --with-stabs -- Specify that stabs debugging information should be
63      used instead of whatever format the host normally uses. Normally GCC
64      uses the same debug format as the host system. 
66    * --enable-multilib -- Specify that multiple libraries should be built
67      to support different target variants, calling conventions, etc. This is the
68      default. 
70    * --enable-threads -- Specify that the target supports threads. 
71    * --enable-threads=lib -- Specify that lib is the thread support
72      library. 
74    * --with-cpu=cpu -- Specify which cpu variant the compiler should
75      generate code for by default. This is currently only supported on the
76      RS6000/PowerPC ports. 
78 Some options which only apply to building cross compilers: 
80    * --with-headers=dir -- Specifies a directory which has target include
81      files. 
83    * --with-libs=dirs -- Specifies a list of directories which contain the
84      target runtime libraries. 
86    * --with-newlib -- Specifies that "newlib" is being used as the target C
87      library. This causes __eprintf to be omitted from libgcc.a on the
88      assumption that it will be provided by newlib. 
90 Note that each --enable option has a corresponding --disable option and
91 that each --with option has a corresponding --without option.