• Aucun résultat trouvé

Configuration Options

Dans le document For Mary (Page 51-61)

The installation options are the ones specified on the command line of theconfigure script. This script generates the files that control compiling and installing. Every option has a default that is correct for creating a compiler (or set of compilers) for your local machine, but there are circumstances where adjustments must be made. The following is a description of these options:

Enable and disable Options that have names beginning with--enableall have corresponding option names beginning with--disable. Which one of these is the default will vary from one platform to the next. In the following alphabetical listing of the options, these are all listed under the names that begin with--enable.

With and without Options that have names beginning with--withall have corresponding option names beginning with--without. Which of the two is the default will vary from one platform to the next. The following alphabetical listing of the options shows all the names beginning with--with.

Languages By default, theconfigurescript will prepare to compile all the languages you have installed, but you can specify which languages are actually compiled with the--enable-languagesoption.

Prefixdirectory name The parts of the compiler are installed into a set of directories with fairly standard names, but you can specify the names to be anything you like. Even when you do elect to change the directory names, you will seldom need to use any option other than--prefix, because the prefix directory is the root name of all the installation directories. You should be aware that using the same directory tree as both the source and object files is not recommended because it can lead to some conflicts that cause problems.

File names It is possible to specify modifications to be made to the names of the files that make up the compiler. This is particularly useful if you are developing your own experimental compiler or want to install more than one version of GCC.

Libraries Part of GCC is the libraries that contain the runtime functions employed by the various languages. Both shared and static libraries are created as part of the GCC installation. Some of the libraries are required and some are optional.

Assembler and Linker A collection of options can be used to specify the names and locations of the assembler and linker to be employed. If you do not use the options to specify their location, two steps are taken by the configuration procedure to try to locate them:

1. Theconfigurationscript looks in the directory namedexec-prefix/

lib/gcc-lib/target/version, whereexec-prefixdefaults to/usr/local, unless it has been change by either the--prefixor--exec-prefix option for setting directory names. Thetargetis the name of the target system, and theversionnumber refers to GCC.

2.Theconfigurescript looks in the directories that are specific to the operating systems (such as/usr/ccs/binfor Solaris and/usr/bin for Linux).

Code generation There are two categories of code generation options: One specifies the type of object code to be included as part of the compiler itself, and the other specifies the kind of code to be produced from the compiler.

Platform The platform is also called thetargetor thehost. Some options apply to specific hardware running specific operating systems. Although the config.guessscript can almost always guess which platform you are using, there are certain hardware options it cannot detect. Some systems appear to be identical when, actually, slight variations exist.

--bindir=directory

The default isexec-prefix/bin. This is the name of the directory to contain the executables. ThePATHenvironment variable normally contains this directory name, so the compiler names can be entered directly from the command line.

--build=host

Generates the configuration to be run on the specified host. The default is to be the same platform as the one set by the--host option, which defaults to the output of the scriptconfig.guess.

--cache-file=filename

Theconfigurescript performs numerous tests to determine the configuration and capabilities of the local machine. The named file will contain the results of the test.

--datadir=directory

The default isprefix/share. This is the name of the directory to contain data files, such as locale information.

--enable-altivec

Specifies that the target platform is a PowerPC that supports AltiVec vector enhancements.

This option causes the generation of AltiVec code when appropriate.

THEFREESOFTWARECOMPILER

--enable-checking=check[,check,...]

This option will enable the generation of code that performs some internal checks of the compiler. The checks will generate diagnostic output and increase compilation time, but they have no other effect on output from the compiler. This option is set by default when compiling from a CVS download, but it is not set when compiling a released version.

You can specify the list of checks you want by choosing amongmisc,tree,gc, rt1, andgcac. If you omit the list and just specify--enable-checking, the list will default to onlymisc,tree, andgc. The checksrt1andgcacare very expensive.

--enable-cpp

Specifies that the user accessible version of cpp (the C preprocessor) be installed. This is normally the default. Also see--with-cpp-install-dir.

--enable-languages=language[,language,...]

Specifies that only the named languages are to have compilers built for them. The available language names areada,c,c++,f77,java,objc, andCHILL. Without this option specified, all languages are compiled. Some extra steps are required to compile Ada, as described in Chapter 9. The CHILL language is no longer supported and will not compile properly except in older versions of GCC.

--enable-libgcj

Specifies that the runtime library for Java be built. This is the default. Specifying --disable-libgcjmakes it possible to create a Java compiler but use a runtime library from another source.

--enable-maintainer-mode

Specifies that the file namedgcc.potbe regenerated from the source code. This file is the master message catalog containing all the error and warning diagnostic messages generated by the compiler. This file is used for internationalization, as described in Chapter 11.

For this to work correctly, you will need the complete source tree and a recent version of gettext.

--enable-multilib

This is the default on most systems. This option specifies that multiple libraries for the target machine be built. These libraries are normally built to support the different target variants, floating point emulation, function calling conventions, and so on. Instead of suppressing the generation of all the libraries, for the platforms listed in Table 2-3 you can suppress certain libraries by name. For example, for the platform arc-*-elf*, you can use the option--disable-biendianto suppress the creation of that one library.

--enable-nls

Specifies that Native Language Support (NLS) be included as part of the compiler to allow for the display of warning and error messages in languages other than American English. Also see--with-included-gettextand--with-catgets.

THEFREESOFTWARECOMPILER

--enable-shared

This is the default. Specifying--disable-shared will build only static libraries.

--enable-shared[=package[,package ...]]

For GCC versions 2.95 and earlier, this option is necessary to have shared libraries built. In later versions, shared libraries are built by default for all platforms that support them.

Specifying a list of package names will instruct that shared libraries be built only for the named packages. The recognized package names arelibgcc,libstdc++, libffi,zlib,boehm-gc, andlibjava.

--enable-target-optspace

Specifies that the libraries should be optimized for size instead of speed.

--enable-threads

For some platforms, this is the default. It specifies that the target supports threads. This affects the libraries for Objective C and exception handling for C++ and Java. If there are no threads for the target system or if the compiler is not able to generate threaded code for the target system, the option--disable-threadsis equivalent to --enable-threads=single.

--enable-threads=library

Specifies that the named library is the thread support library. Table 2-4 lists the possible library names.

--enable-version-specific-runtime-libs

Specifies that the header files for certain runtime libraries are installed in a directory named for the target and version instead of the usual places. The libraries are installed

Platform Library Name arc-*-elf* Biendian

arm-*-* fpu, 26bit, underscore, interwork, biendian, nofmult m68*-*-* softfloat, m68881, m68000, m68020

mips*-*-* single-float, biendian, softfloat

powerpc*-*-* aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian, sysv, aix

rs6000*-*-* aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos, biendian, sysv, aix

Table 2-3. Variant Librar y Suppression by Platform

inlibdir/gcc-lib/target/version. The include files forlibstdc++are installed in libdir/gcc-lib/target/version/include/g++, unless you specify the location with the--with-gxx-include-diroption.

--enable-win32-registry

Specifies that a Win32 version of GCC is not to use the Registry to locate installation paths of the compiler and its libraries by using the following Registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\key

The value ofkeydefaults to the GCC version number. The value of the key can be set with the option--enable-win32-registry.

--enable-win32-registry=key

Specifies that a Win32 version of GCC locate the installation paths in the Windows Registry using the following Registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\key Library Description

aix AIX thread support.

dce DCE thread support.

mach The generic MACH thread support. This option requires that you provide a copy of the gthr-mach.h header file.

no Same as single.

posix Standard POSIX thread support.

rtems RTEMS thread support.

single Disables thread support.

solaris Sun Solaris 2 thread support.

vxworks VxWorks thread support.

win32 Microsoft Win32 thread support.

Table 2-4. Names Used to Select Thread Suppor t

THEFREESOFTWARECOMPILER If you do not specify this option, the default is to use the GCC version number as

the key. Using the Registry this way makes it possible to install and use different versions of GCC in different locations.

--exec-prefix=directory

The default isprefix. This is the name of the top level directory to hold any architecture-dependent files.

--help

This option will print a list of the command-line options and will cause theconfigure script to terminate without doing anything else. The option list is organized by category.

--host=host

The name of the host computer. The default is the output of the scriptconfig.guess. GCC runs on a wide variety of hosts.

--includedir=directory

The default isprefix/include. This is the name of the directory to contain the C header files.

--infodir=directory

The default isprefix/info. This is the name of the directory in which to store documentation in theinfoformat.

--libdir=directory

The default isexec-prefix/lib. This is the name of the directory to contain the static libraries and other internal parts of GCC.

--libexecdir=directory

The default isexec-prefix/libexec. This is the name of the directory to contain certain program executables associated with libraries.

--localstatedir=directory

The default isprefix/etc. This is the name of the directory to contain modifiable data specific to a single machine. Also seesysconfdir.

--mandir=directory

The default isprefix/man. This is the name of the directory to contain the man pages.

--nfp

Specifies that the machine does not have a floating point unit. This option only applies tom68k-sun-sunos*andm68k-isi-bsd.

--no-create

The configuration script will run but will not create the output files necessary to compile the code.

--norecursion

The source tree contains a separateconfigurescript for each directory. Executing oneconfigurescript will also cause the execution of theconfigurescripts in all the subdirectories, unless this option is specified.

--prefix=directory

The default is/usr/local. This is the top level directory used for the entire installation of GCC. The default is to place all the other directories inside theprefixdirectory with the namesbin,include,info,lib,man, andshare. Specifying theprefixname specifies the path name to each of the other directories, unless one of the other naming options is used to specifically change it.

--program-prefix=prefix

The default is not to use a prefix. The prefix name is placed on the front of all the file names placed in the bin directory. For example, to change the installed name of the Java compiler fromgcjtostim-gcj, you would use the following option:

--program-prefix=stim---program-suffix=suffix

The default is not to use a suffix. The suffix name is added to the end of all the file names placed in the bin directory. For example, to change the installed name of the Java compiler fromgcjtogcj-v4, you would use the following option:

--program-suffix=-v4 --program-transform-name=pattern

The pattern is asedscript to be applied to the names of the files placed in thebin directory. Usingsedscripts this way makes it possible to modify the name of each of the executable files individually. For example, to change the name of the Java compiler gcjtogjava, and to change the name ofg++togcplus, and leave all the other names as they are, you would use the following option:

--program-transform-name='s/^gcj$/gjava/; s/^g++$/gcplus/'

This option can be used in combination with the prefix and suffix options because --program-prefixand--program-suffixare always applied to the name before the pattern scripts of this option are applied. This option cannot be used when creating a cross compiler.

--sbindir=directory

The default isexec-prefix/sbin. This is the name of the directory to contain the system executables.

THEFREESOFTWARECOMPILER --silent

This option suppresses output fromconfigurescript, which normally lists all the tests it makes. This option is the same as--quiet.

--srcdir=directory

The named directory is expected to contain the fileconfigure.in, which provides configurewith specific information about the names and locations of the source files.

--sysconfdir=directory

The default isprefix/etc. This is the name of the directory to contain read-only data specific to a single machine. Also seelocalstatedir.

--target=host

The target machine (the one on which the compiler is to run) defaults to the output from the scriptconfig.guess.

--tmpdir=directory

Specifies the name of the directory to be used by theconfigurescript to store its temporary work files.

--version

Prints the version number of theautoconfutility used to create theconfigurescripts;

it takes no further action.

--with-as=pathname

Specifies the full path name of the assembler. This option is needed if the assembler cannot be found by following the default search procedure of theconfigurescript, or if there is more than one assembler on the system and you need to specify which one to use.

--with-catgets

If NLS is enabled by--enable-nlsbut the host does not havesettextinstalled, the compiler will use the host’scatgets.

--with-cpp-install-dir=directory

Specifies that a copy ofcpp(the C preprocessor) be installed asprefix/directory/

cppin addition to being installed ascppin the directory specified by the--bindir option (which defaults toexec-prefix/bin). Also see--disable-cpp.

--with-cpu=cpu

Specifies a CPU for the target platform. If a specific CPU for a platform is selected, GCC has the opportunity to produce better code than it does when producing code for a family of processors. Table 2-5 lists the CPU names recognized for this version of GCC.

New CPU names are being constantly added; therefore, if you don’t find the one you need in the table, look in the configuration fileconfig.gcc.

--with-dwarf2

Specifies that the debugging information produced by the compiler be, by default, in the DWARF 2 format.

--with-gnu-as

Specifies that whatever assembler is found, it is assumed to be the GNU assembler. On a system sensitive to this situation, there could be problems if this option is specified and the actual assembler found is not the GNU assembler. Problems could also arise if this option is specified and the assembler found is the GNU compiler. The following is a list of platforms on which this matters:

hppa1.0-*-* m68k-sony-bsd

hppa1.1-*-* m68k-altos-sysv

i386-*-sysv m68000-hp-hpux

i386-*-isc m68000-att-sysv

i860-*-bsd *-lynx-lynxos

m68k-bull-sysv mips-*

m68k-hp-hpux

If you have more than one assembler on your system, you should specify which one to use with the--with-as option. On the following systems, if you use the GNU assembler, you must also use the GNU linker (and specify it with the --with-ld option):

Platform CPU Names

arm*-*-* xarm2, xarm3, xarm6, xarm7, xarm8, xarm9, xarm250, xarm600, xarm610, xarm700, xarm710, xarm7m, xarm7dm, xarm7dmi, xarm7tdmi, xarm9tdmi, xarm7100, xarm7500, xarm7500fe, xarm810, xxscale, xstrongarm, xstrongarm110, xstrongarm1100 powerpc*-*-* xcommon, xpower, xpower2, xpower3, xpowerpc, xpowerpc64,

xrios, xrios1, xrios2, xrsc, xrsc1, xrs64a, x401, x403, x405, x505, x601, x602, x603, x603e, x604, x604e, x620, x630, x740, x750, xx801, x821, x823, x8607400, x7450, xec603e

sparc*-*-* supersparc, hypersparc, ultrasparc, v7, v8, v9 Table 2-5. CPUs That Can Be Specified by Name

THEFREESOFTWARECOMPILER

i386-*-sysv m68k-altos-sysv

i860-*-bsd m68000-hp-hpux

m68k-bull-sysv m68000-att-sysv

m68k-hp-hpux *-lynx-lynxos

m68k-sony-bsd mips-* (except mips-sgi-irix5-*) --with-gnu-ld

The same as the option--with-gnu-as, except it is for the linker.

--with-gxx-include-dir=directory

The default isprefix/include/g++-v3. This is the name of the directory for the g++header files. Also see--enable-version-specific-runtime-libs. --with-headers=directory

Specifies the directory that contains the header files of the target when building a cross compiler. This is a required option if the directoryprefix/target/sys-include does not exist. The header files will be copied into the GCC installation directory and modified so they will be compatible. Also see--with-newlib and--with-libs. --with-included-gettext

If NLS is enabled by--enable-nls, this option specifies that the build process try using its own copy ofgettextbefore using the version installed on the system.

--with-ld=pathname

The same as the option--with-as, except it is for the linker.

--with-libs=“directory [directory ...]”

This option is for building a cross compiler. The libraries in the named directories will be copied into the GCC install directory. Also see--with-headersand --with-newlib.

--with-local-prefix=directory

The default is/usr/local. This is the prefix of the include directory that will be searched by the compiler for locally installed include files. This option should be

The default is/usr/local. This is the prefix of the include directory that will be searched by the compiler for locally installed include files. This option should be

Dans le document For Mary (Page 51-61)