gccinstall: Configuration
1
1 4 Installing GCC: Configuration
1 *******************************
1
1 Like most GNU software, GCC must be configured before it can be built.
1 This document describes the recommended configuration procedure for both
1 native and cross targets.
1
1 We use SRCDIR to refer to the toplevel source directory for GCC; we
1 use OBJDIR to refer to the toplevel build/object directory.
1
1 If you obtained the sources by cloning the repository, SRCDIR must
1 refer to the top 'gcc' directory, the one where the 'MAINTAINERS' file
1 can be found, and not its 'gcc' subdirectory, otherwise the build will
1 fail.
1
1 If either SRCDIR or OBJDIR is located on an automounted NFS file
1 system, the shell's built-in 'pwd' command will return temporary
1 pathnames. Using these can lead to various sorts of build problems. To
1 avoid this issue, set the 'PWDCMD' environment variable to an
1 automounter-aware 'pwd' command, e.g., 'pawd' or 'amq -w', during the
1 configuration and build phases.
1
1 First, we *highly* recommend that GCC be built into a separate
1 directory from the sources which does *not* reside within the source
1 tree. This is how we generally build GCC; building where SRCDIR ==
1 OBJDIR should still work, but doesn't get extensive testing; building
1 where OBJDIR is a subdirectory of SRCDIR is unsupported.
1
1 If you have previously built GCC in the same directory for a
1 different target machine, do 'make distclean' to delete all files that
1 might be invalid. One of the files this deletes is 'Makefile'; if 'make
1 distclean' complains that 'Makefile' does not exist or issues a message
1 like "don't know how to make distclean" it probably means that the
1 directory is already suitably clean. However, with the recommended
1 method of building in a separate OBJDIR, you should simply use a
1 different OBJDIR for each target.
1
1 Second, when configuring a native system, either 'cc' or 'gcc' must
1 be in your path or you must set 'CC' in your environment before running
1 configure. Otherwise the configuration scripts may fail.
1
1 To configure GCC:
1
1 % mkdir OBJDIR
1 % cd OBJDIR
1 % SRCDIR/configure [OPTIONS] [TARGET]
1
1 Distributor options
1 ===================
1
1 If you will be distributing binary versions of GCC, with modifications
1 to the source code, you should use the options described in this section
1 to make clear that your version contains modifications.
1
1 '--with-pkgversion=VERSION'
1 Specify a string that identifies your package. You may wish to
1 include a build number or build date. This version string will be
1 included in the output of 'gcc --version'. This suffix does not
1 replace the default version string, only the 'GCC' part.
1
1 The default value is 'GCC'.
1
1 '--with-bugurl=URL'
1 Specify the URL that users should visit if they wish to report a
1 bug. You are of course welcome to forward bugs reported to you to
1 the FSF, if you determine that they are not bugs in your
1 modifications.
1
1 The default value refers to the FSF's GCC bug tracker.
1
1 Target specification
1 ====================
1
1 * GCC has code to correctly determine the correct value for TARGET
1 for nearly all native systems. Therefore, we highly recommend you
1 do not provide a configure target when configuring a native
1 compiler.
1
1 * TARGET must be specified as '--target=TARGET' when configuring a
1 cross compiler; examples of valid targets would be m68k-elf,
1 sh-elf, etc.
1
1 * Specifying just TARGET instead of '--target=TARGET' implies that
1 the host defaults to TARGET.
1
1 Options specification
1 =====================
1
1 Use OPTIONS to override several configure time options for GCC. A list
1 of supported OPTIONS follows; 'configure --help' may list other options,
1 but those not listed below may not work and should not normally be used.
1
1 Note that each '--enable' option has a corresponding '--disable'
1 option and that each '--with' option has a corresponding '--without'
1 option.
1
1 '--prefix=DIRNAME'
1 Specify the toplevel installation directory. This is the
1 recommended way to install the tools into a directory other than
1 the default. The toplevel installation directory defaults to
1 '/usr/local'.
1
1 We *highly* recommend against DIRNAME being the same or a
1 subdirectory of OBJDIR or vice versa. If specifying a directory
1 beneath a user's home directory tree, some shells will not expand
1 DIRNAME correctly if it contains the '~' metacharacter; use '$HOME'
1 instead.
1
1 The following standard 'autoconf' options are supported. Normally
1 you should not need to use these options.
1 '--exec-prefix=DIRNAME'
1 Specify the toplevel installation directory for
1 architecture-dependent files. The default is 'PREFIX'.
1
1 '--bindir=DIRNAME'
1 Specify the installation directory for the executables called
1 by users (such as 'gcc' and 'g++'). The default is
1 'EXEC-PREFIX/bin'.
1
1 '--libdir=DIRNAME'
1 Specify the installation directory for object code libraries
1 and internal data files of GCC. The default is
1 'EXEC-PREFIX/lib'.
1
1 '--libexecdir=DIRNAME'
1 Specify the installation directory for internal executables of
1 GCC. The default is 'EXEC-PREFIX/libexec'.
1
1 '--with-slibdir=DIRNAME'
1 Specify the installation directory for the shared libgcc
1 library. The default is 'LIBDIR'.
1
1 '--datarootdir=DIRNAME'
1 Specify the root of the directory tree for read-only
1 architecture-independent data files referenced by GCC. The
1 default is 'PREFIX/share'.
1
1 '--infodir=DIRNAME'
1 Specify the installation directory for documentation in info
1 format. The default is 'DATAROOTDIR/info'.
1
1 '--datadir=DIRNAME'
1 Specify the installation directory for some
1 architecture-independent data files referenced by GCC. The
1 default is 'DATAROOTDIR'.
1
1 '--docdir=DIRNAME'
1 Specify the installation directory for documentation files
1 (other than Info) for GCC. The default is 'DATAROOTDIR/doc'.
1
1 '--htmldir=DIRNAME'
1 Specify the installation directory for HTML documentation
1 files. The default is 'DOCDIR'.
1
1 '--pdfdir=DIRNAME'
1 Specify the installation directory for PDF documentation
1 files. The default is 'DOCDIR'.
1
1 '--mandir=DIRNAME'
1 Specify the installation directory for manual pages. The
1 default is 'DATAROOTDIR/man'. (Note that the manual pages are
1 only extracts from the full GCC manuals, which are provided in
1 Texinfo format. The manpages are derived by an automatic
1 conversion process from parts of the full manual.)
1
1 '--with-gxx-include-dir=DIRNAME'
1 Specify the installation directory for G++ header files. The
1 default depends on other configuration options, and differs
1 between cross and native configurations.
1
1 '--with-specs=SPECS'
1 Specify additional command line driver SPECS. This can be
1 useful if you need to turn on a non-standard feature by
1 default without modifying the compiler's source code, for
1 instance
1 Specifying subprocesses and the switches to pass to them:
1 (gcc)Spec Files,
1
1 '--program-prefix=PREFIX'
1 GCC supports some transformations of the names of its programs when
1 installing them. This option prepends PREFIX to the names of
1 programs to install in BINDIR (see above). For example, specifying
1 '--program-prefix=foo-' would result in 'gcc' being installed as
1 '/usr/local/bin/foo-gcc'.
1
1 '--program-suffix=SUFFIX'
1 Appends SUFFIX to the names of programs to install in BINDIR (see
1 above). For example, specifying '--program-suffix=-3.1' would
1 result in 'gcc' being installed as '/usr/local/bin/gcc-3.1'.
1
1 '--program-transform-name=PATTERN'
1 Applies the 'sed' script PATTERN to be applied to the names of
1 programs to install in BINDIR (see above). PATTERN has to consist
1 of one or more basic 'sed' editing commands, separated by
1 semicolons. For example, if you want the 'gcc' program name to be
1 transformed to the installed program '/usr/local/bin/myowngcc' and
1 the 'g++' program name to be transformed to
1 '/usr/local/bin/gspecial++' without changing other program names,
1 you could use the pattern
1 '--program-transform-name='s/^gcc$/myowngcc/; s/^g++$/gspecial++/''
1 to achieve this effect.
1
1 All three options can be combined and used together, resulting in
1 more complex conversion patterns. As a basic rule, PREFIX (and
1 SUFFIX) are prepended (appended) before further transformations can
1 happen with a special transformation script PATTERN.
1
1 As currently implemented, this option only takes effect for native
1 builds; cross compiler binaries' names are not transformed even
1 when a transformation is explicitly asked for by one of these
1 options.
1
1 For native builds, some of the installed programs are also
1 installed with the target alias in front of their name, as in
1 'i686-pc-linux-gnu-gcc'. All of the above transformations happen
1 before the target alias is prepended to the name--so, specifying
1 '--program-prefix=foo-' and 'program-suffix=-3.1', the resulting
1 binary would be installed as
1 '/usr/local/bin/i686-pc-linux-gnu-foo-gcc-3.1'.
1
1 As a last shortcoming, none of the installed Ada programs are
1 transformed yet, which will be fixed in some time.
1
1 '--with-local-prefix=DIRNAME'
1 Specify the installation directory for local include files. The
1 default is '/usr/local'. Specify this option if you want the
1 compiler to search directory 'DIRNAME/include' for locally
1 installed header files _instead_ of '/usr/local/include'.
1
1 You should specify '--with-local-prefix' *only* if your site has a
1 different convention (not '/usr/local') for where to put
1 site-specific files.
1
1 The default value for '--with-local-prefix' is '/usr/local'
1 regardless of the value of '--prefix'. Specifying '--prefix' has
1 no effect on which directory GCC searches for local header files.
1 This may seem counterintuitive, but actually it is logical.
1
1 The purpose of '--prefix' is to specify where to _install GCC_. The
1 local header files in '/usr/local/include'--if you put any in that
1 directory--are not part of GCC. They are part of other
1 programs--perhaps many others. (GCC installs its own header files
1 in another directory which is based on the '--prefix' value.)
1
1 Both the local-prefix include directory and the GCC-prefix include
1 directory are part of GCC's "system include" directories. Although
1 these two directories are not fixed, they need to be searched in
1 the proper order for the correct processing of the include_next
1 directive. The local-prefix include directory is searched before
1 the GCC-prefix include directory. Another characteristic of system
1 include directories is that pedantic warnings are turned off for
1 headers in these directories.
1
1 Some autoconf macros add '-I DIRECTORY' options to the compiler
1 command line, to ensure that directories containing installed
1 packages' headers are searched. When DIRECTORY is one of GCC's
1 system include directories, GCC will ignore the option so that
1 system directories continue to be processed in the correct order.
1 This may result in a search order different from what was specified
1 but the directory will still be searched.
1
1 GCC automatically searches for ordinary libraries using
1 'GCC_EXEC_PREFIX'. Thus, when the same installation prefix is used
1 for both GCC and packages, GCC will automatically search for both
1 headers and libraries. This provides a configuration that is easy
1 to use. GCC behaves in a manner similar to that when it is
1 installed as a system compiler in '/usr'.
1
1 Sites that need to install multiple versions of GCC may not want to
1 use the above simple configuration. It is possible to use the
1 '--program-prefix', '--program-suffix' and
1 '--program-transform-name' options to install multiple versions
1 into a single directory, but it may be simpler to use different
1 prefixes and the '--with-local-prefix' option to specify the
1 location of the site-specific files for each version. It will then
1 be necessary for users to specify explicitly the location of local
1 site libraries (e.g., with 'LIBRARY_PATH').
1
1 The same value can be used for both '--with-local-prefix' and
1 '--prefix' provided it is not '/usr'. This can be used to avoid
1 the default search of '/usr/local/include'.
1
1 *Do not* specify '/usr' as the '--with-local-prefix'! The
1 directory you use for '--with-local-prefix' *must not* contain any
1 of the system's standard header files. If it did contain them,
1 certain programs would be miscompiled (including GNU Emacs, on
1 certain targets), because this would override and nullify the
1 header file corrections made by the 'fixincludes' script.
1
1 Indications are that people who use this option use it based on
1 mistaken ideas of what it is for. People use it as if it specified
1 where to install part of GCC. Perhaps they make this assumption
1 because installing GCC creates the directory.
1
1 '--with-gcc-major-version-only'
1 Specifies that GCC should use only the major number rather than
1 MAJOR.MINOR.PATCHLEVEL in filesystem paths.
1
1 '--with-native-system-header-dir=DIRNAME'
1 Specifies that DIRNAME is the directory that contains native system
1 header files, rather than '/usr/include'. This option is most
1 useful if you are creating a compiler that should be isolated from
1 the system as much as possible. It is most commonly used with the
1 '--with-sysroot' option and will cause GCC to search DIRNAME inside
1 the system root specified by that option.
1
1 '--enable-shared[=PACKAGE[,...]]'
1 Build shared versions of libraries, if shared libraries are
1 supported on the target platform. Unlike GCC 2.95.x and earlier,
1 shared libraries are enabled by default on all platforms that
1 support shared libraries.
1
1 If a list of packages is given as an argument, build shared
1 libraries only for the listed packages. For other packages, only
1 static libraries will be built. Package names currently recognized
1 in the GCC tree are 'libgcc' (also known as 'gcc'), 'libstdc++'
1 (not 'libstdc++-v3'), 'libffi', 'zlib', 'boehm-gc', 'ada',
1 'libada', 'libgo', and 'libobjc'. Note 'libiberty' does not
1 support shared libraries at all.
1
1 Use '--disable-shared' to build only static libraries. Note that
1 '--disable-shared' does not accept a list of package names as
1 argument, only '--enable-shared' does.
1
1 Contrast with '--enable-host-shared', which affects _host_ code.
1
1 '--enable-host-shared'
1 Specify that the _host_ code should be built into
1 position-independent machine code (with -fPIC), allowing it to be
1 used within shared libraries, but yielding a slightly slower
1 compiler.
1
1 This option is required when building the libgccjit.so library.
1
1 Contrast with '--enable-shared', which affects _target_ libraries.
1
1 '--with-gnu-as'
1 Specify that the compiler should assume that the assembler it finds
1 is the GNU assembler. However, this does not modify the rules to
1 find an assembler and will result in confusion if the assembler
1 found is not actually the GNU assembler. (Confusion may also
1 result if the compiler finds the GNU assembler but has not been
1 configured with '--with-gnu-as'.) If you have more than one
1 assembler installed on your system, you may want to use this option
1 in connection with '--with-as=PATHNAME' or
1 '--with-build-time-tools=PATHNAME'.
1
1 The following systems are the only ones where it makes a difference
1 whether you use the GNU assembler. On any other system,
1 '--with-gnu-as' has no effect.
1
1 * 'hppa1.0-ANY-ANY'
1 * 'hppa1.1-ANY-ANY'
1 * 'sparc-sun-solaris2.ANY'
1 * 'sparc64-ANY-solaris2.ANY'
1
1 '--with-as=PATHNAME'
1 Specify that the compiler should use the assembler pointed to by
1 PATHNAME, rather than the one found by the standard rules to find
1 an assembler, which are:
1 * Unless GCC is being built with a cross compiler, check the
1 'LIBEXEC/gcc/TARGET/VERSION' directory. LIBEXEC defaults to
1 'EXEC-PREFIX/libexec'; EXEC-PREFIX defaults to PREFIX, which
1 defaults to '/usr/local' unless overridden by the
1 '--prefix=PATHNAME' switch described above. TARGET is the
1 target system triple, such as 'sparc-sun-solaris2.7', and
1 VERSION denotes the GCC version, such as 3.0.
1
1 * If the target system is the same that you are building on,
1 check operating system specific directories (e.g.
1 '/usr/ccs/bin' on Sun Solaris 2).
1
1 * Check in the 'PATH' for a tool whose name is prefixed by the
1 target system triple.
1
1 * Check in the 'PATH' for a tool whose name is not prefixed by
1 the target system triple, if the host and target system triple
1 are the same (in other words, we use a host tool if it can be
1 used for the target as well).
1
1 You may want to use '--with-as' if no assembler is installed in the
1 directories listed above, or if you have multiple assemblers
1 installed and want to choose one that is not found by the above
1 rules.
1
1 '--with-gnu-ld'
1 Same as '--with-gnu-as' but for the linker.
1
1 '--with-ld=PATHNAME'
1 Same as '--with-as' but for the linker.
1
1 '--with-stabs'
1 Specify that stabs debugging information should be used instead of
1 whatever format the host normally uses. Normally GCC uses the same
1 debug format as the host system.
1
1 '--with-tls=DIALECT'
1 Specify the default TLS dialect, for systems were there is a
1 choice. For ARM targets, possible values for DIALECT are 'gnu' or
1 'gnu2', which select between the original GNU dialect and the GNU
1 TLS descriptor-based dialect.
1
1 '--enable-multiarch'
1 Specify whether to enable or disable multiarch support. The
1 default is to check for glibc start files in a multiarch location,
1 and enable it if the files are found. The auto detection is
1 enabled for native builds, and for cross builds configured with
1 '--with-sysroot', and without '--with-native-system-header-dir'.
1 More documentation about multiarch can be found at
1 <https://wiki.debian.org/Multiarch>.
1
1 '--enable-sjlj-exceptions'
1 Force use of the 'setjmp'/'longjmp'-based scheme for exceptions.
1 'configure' ordinarily picks the correct value based on the
1 platform. Only use this option if you are sure you need a
1 different setting.
1
1 '--enable-vtable-verify'
1 Specify whether to enable or disable the vtable verification
1 feature. Enabling this feature causes libstdc++ to be built with
1 its virtual calls in verifiable mode. This means that, when linked
1 with libvtv, every virtual call in libstdc++ will verify the vtable
1 pointer through which the call will be made before actually making
1 the call. If not linked with libvtv, the verifier will call stub
1 functions (in libstdc++ itself) and do nothing. If vtable
1 verification is disabled, then libstdc++ is not built with its
1 virtual calls in verifiable mode at all. However the libvtv
1 library will still be built (see '--disable-libvtv' to turn off
1 building libvtv). '--disable-vtable-verify' is the default.
1
1 '--disable-multilib'
1 Specify that multiple target libraries to support different target
1 variants, calling conventions, etc. should not be built. The
1 default is to build a predefined set of them.
1
1 Some targets provide finer-grained control over which multilibs are
1 built (e.g., '--disable-softfloat'):
1 'arm-*-*'
1 fpu, 26bit, underscore, interwork, biendian, nofmult.
1
1 'm68*-*-*'
1 softfloat, m68881, m68000, m68020.
1
1 'mips*-*-*'
1 single-float, biendian, softfloat.
1
1 'powerpc*-*-*, rs6000*-*-*'
1 aix64, pthread, softfloat, powercpu, powerpccpu, powerpcos,
1 biendian, sysv, aix.
1
1 '--with-multilib-list=LIST'
1 '--without-multilib-list'
1 Specify what multilibs to build. LIST is a comma separated list of
1 values, possibly consisting of a single value. Currently only
1 implemented for aarch64*-*-*, arm*-*-*, sh*-*-* and
1 x86-64-*-linux*. The accepted alues and meaning for each target is
1 given below.
1
1 'aarch64*-*-*'
1 LIST is a comma separated list of 'ilp32', and 'lp64' to
1 enable ILP32 and LP64 run-time libraries, respectively. If
1 LIST is empty, then there will be no multilibs and only the
1 default run-time library will be built. If LIST is 'default'
1 or -with-multilib-list= is not specified, then the default set
1 of libraries is selected based on the value of '--target'.
1
1 'arm*-*-*'
1 LIST is a comma separated list of 'aprofile' and 'rmprofile'
1 to build multilibs for A or R and M architecture profiles
1 respectively. Note that, due to some limitation of the
1 current multilib framework, using the combined
1 'aprofile,rmprofile' multilibs selects in some cases a less
1 optimal multilib than when using the multilib profile for the
1 architecture targetted. The special value 'default' is also
1 accepted and is equivalent to omitting the option, ie. only
1 the default run-time library will be enabled.
1
1 The table below gives the combination of ISAs, architectures,
1 FPUs and floating-point ABIs for which multilibs are built for
1 each accepted value. The union of these options is considered
1 when specifying both 'aprofile' and 'rmprofile'.
1
1 Option aprofile rmprofile
1 ISAs '-marm' and '-mthumb'
1 '-mthumb'
1 Architecturesdefault default architecture
1 architecture '-march=armv6s-m'
1 '-march=armv7-a' '-march=armv7-m'
1 '-march=armv7ve' '-march=armv7e-m'
1 '-march=armv8-a' '-march=armv8-m.base'
1 '-march=armv8-m.main'
1 '-march=armv7'
1 FPUs none none
1 '-mfpu=vfpv3-d16' '-mfpu=vfpv3-d16'
1 '-mfpu=neon' '-mfpu=fpv4-sp-d16'
1 '-mfpu=vfpv4-d16' '-mfpu=fpv5-sp-d16'
1 '-mfpu=neon-vfpv4' '-mfpu=fpv5-d16'
1 '-mfpu=neon-fp-armv8'
1 floating-point'-mfloat-abi=soft' '-mfloat-abi=soft'
1 ABIs '-mfloat-abi=softfp' '-mfloat-abi=softfp'
1 '-mfloat-abi=hard' '-mfloat-abi=hard'
1
1 'sh*-*-*'
1 LIST is a comma separated list of CPU names. These must be of
1 the form 'sh*' or 'm*' (in which case they match the compiler
1 option for that processor). The list should not contain any
1 endian options - these are handled by '--with-endian'.
1
1 If LIST is empty, then there will be no multilibs for extra
1 processors. The multilib for the secondary endian remains
1 enabled.
1
1 As a special case, if an entry in the list starts with a '!'
1 (exclamation point), then it is added to the list of excluded
1 multilibs. Entries of this sort should be compatible with
1 'MULTILIB_EXCLUDES' (once the leading '!' has been stripped).
1
1 If '--with-multilib-list' is not given, then a default set of
1 multilibs is selected based on the value of '--target'. This
1 is usually the complete set of libraries, but some targets
1 imply a more specialized subset.
1
1 Example 1: to configure a compiler for SH4A only, but
1 supporting both endians, with little endian being the default:
1 --with-cpu=sh4a --with-endian=little,big --with-multilib-list=
1
1 Example 2: to configure a compiler for both SH4A and
1 SH4AL-DSP, but with only little endian SH4AL:
1 --with-cpu=sh4a --with-endian=little,big \
1 --with-multilib-list=sh4al,!mb/m4al
1
1 'x86-64-*-linux*'
1 LIST is a comma separated list of 'm32', 'm64' and 'mx32' to
1 enable 32-bit, 64-bit and x32 run-time libraries,
1 respectively. If LIST is empty, then there will be no
1 multilibs and only the default run-time library will be
1 enabled.
1
1 If '--with-multilib-list' is not given, then only 32-bit and
1 64-bit run-time libraries will be enabled.
1
1 '--with-endian=ENDIANS'
1 Specify what endians to use. Currently only implemented for
1 sh*-*-*.
1
1 ENDIANS may be one of the following:
1 'big'
1 Use big endian exclusively.
1 'little'
1 Use little endian exclusively.
1 'big,little'
1 Use big endian by default. Provide a multilib for little
1 endian.
1 'little,big'
1 Use little endian by default. Provide a multilib for big
1 endian.
1
1 '--enable-threads'
1 Specify that the target supports threads. This affects the
1 Objective-C compiler and runtime library, and exception handling
1 for other languages like C++. On some systems, this is the
1 default.
1
1 In general, the best (and, in many cases, the only known) threading
1 model available will be configured for use. Beware that on some
1 systems, GCC has not been taught what threading models are
1 generally available for the system. In this case,
1 '--enable-threads' is an alias for '--enable-threads=single'.
1
1 '--disable-threads'
1 Specify that threading support should be disabled for the system.
1 This is an alias for '--enable-threads=single'.
1
1 '--enable-threads=LIB'
1 Specify that LIB is the thread support library. This affects the
1 Objective-C compiler and runtime library, and exception handling
1 for other languages like C++. The possibilities for LIB are:
1
1 'aix'
1 AIX thread support.
1 'dce'
1 DCE thread support.
1 'lynx'
1 LynxOS thread support.
1 'mipssde'
1 MIPS SDE thread support.
1 'no'
1 This is an alias for 'single'.
1 'posix'
1 Generic POSIX/Unix98 thread support.
1 'rtems'
1 RTEMS thread support.
1 'single'
1 Disable thread support, should work for all platforms.
1 'tpf'
1 TPF thread support.
1 'vxworks'
1 VxWorks thread support.
1 'win32'
1 Microsoft Win32 API thread support.
1
1 '--enable-tls'
1 Specify that the target supports TLS (Thread Local Storage).
1 Usually configure can correctly determine if TLS is supported. In
1 cases where it guesses incorrectly, TLS can be explicitly enabled
1 or disabled with '--enable-tls' or '--disable-tls'. This can
1 happen if the assembler supports TLS but the C library does not, or
1 if the assumptions made by the configure test are incorrect.
1
1 '--disable-tls'
1 Specify that the target does not support TLS. This is an alias for
1 '--enable-tls=no'.
1
1 '--with-cpu=CPU'
1 '--with-cpu-32=CPU'
1 '--with-cpu-64=CPU'
1 Specify which cpu variant the compiler should generate code for by
1 default. CPU will be used as the default value of the '-mcpu='
1 switch. This option is only supported on some targets, including
1 ARC, ARM, i386, M68k, PowerPC, and SPARC. It is mandatory for ARC.
1 The '--with-cpu-32' and '--with-cpu-64' options specify separate
1 default CPUs for 32-bit and 64-bit modes; these options are only
1 supported for aarch64, i386, x86-64, PowerPC, and SPARC.
1
1 '--with-schedule=CPU'
1 '--with-arch=CPU'
1 '--with-arch-32=CPU'
1 '--with-arch-64=CPU'
1 '--with-tune=CPU'
1 '--with-tune-32=CPU'
1 '--with-tune-64=CPU'
1 '--with-abi=ABI'
1 '--with-fpu=TYPE'
1 '--with-float=TYPE'
1 These configure options provide default values for the
1 '-mschedule=', '-march=', '-mtune=', '-mabi=', and '-mfpu=' options
1 and for '-mhard-float' or '-msoft-float'. As with '--with-cpu',
1 which switches will be accepted and acceptable values of the
1 arguments depend on the target.
1
1 '--with-mode=MODE'
1 Specify if the compiler should default to '-marm' or '-mthumb'.
1 This option is only supported on ARM targets.
1
1 '--with-stack-offset=NUM'
1 This option sets the default for the -mstack-offset=NUM option, and
1 will thus generally also control the setting of this option for
1 libraries. This option is only supported on Epiphany targets.
1
1 '--with-fpmath=ISA'
1 This options sets '-mfpmath=sse' by default and specifies the
1 default ISA for floating-point arithmetics. You can select either
1 'sse' which enables '-msse2' or 'avx' which enables '-mavx' by
1 default. This option is only supported on i386 and x86-64 targets.
1
1 '--with-fp-32=MODE'
1 On MIPS targets, set the default value for the '-mfp' option when
1 using the o32 ABI. The possibilities for MODE are:
1 '32'
1 Use the o32 FP32 ABI extension, as with the '-mfp32'
1 command-line option.
1 'xx'
1 Use the o32 FPXX ABI extension, as with the '-mfpxx'
1 command-line option.
1 '64'
1 Use the o32 FP64 ABI extension, as with the '-mfp64'
1 command-line option.
1 In the absence of this configuration option the default is to use
1 the o32 FP32 ABI extension.
1
1 '--with-odd-spreg-32'
1 On MIPS targets, set the '-modd-spreg' option by default when using
1 the o32 ABI.
1
1 '--without-odd-spreg-32'
1 On MIPS targets, set the '-mno-odd-spreg' option by default when
1 using the o32 ABI. This is normally used in conjunction with
1 '--with-fp-32=64' in order to target the o32 FP64A ABI extension.
1
1 '--with-nan=ENCODING'
1 On MIPS targets, set the default encoding convention to use for the
1 special not-a-number (NaN) IEEE 754 floating-point data. The
1 possibilities for ENCODING are:
1 'legacy'
1 Use the legacy encoding, as with the '-mnan=legacy'
1 command-line option.
1 '2008'
1 Use the 754-2008 encoding, as with the '-mnan=2008'
1 command-line option.
1 To use this configuration option you must have an assembler version
1 installed that supports the '-mnan=' command-line option too. In
1 the absence of this configuration option the default convention is
1 the legacy encoding, as when neither of the '-mnan=2008' and
1 '-mnan=legacy' command-line options has been used.
1
1 '--with-divide=TYPE'
1 Specify how the compiler should generate code for checking for
1 division by zero. This option is only supported on the MIPS
1 target. The possibilities for TYPE are:
1 'traps'
1 Division by zero checks use conditional traps (this is the
1 default on systems that support conditional traps).
1 'breaks'
1 Division by zero checks use the break instruction.
1
1 '--with-llsc'
1 On MIPS targets, make '-mllsc' the default when no '-mno-llsc'
1 option is passed. This is the default for Linux-based targets, as
1 the kernel will emulate them if the ISA does not provide them.
1
1 '--without-llsc'
1 On MIPS targets, make '-mno-llsc' the default when no '-mllsc'
1 option is passed.
1
1 '--with-synci'
1 On MIPS targets, make '-msynci' the default when no '-mno-synci'
1 option is passed.
1
1 '--without-synci'
1 On MIPS targets, make '-mno-synci' the default when no '-msynci'
1 option is passed. This is the default.
1
1 '--with-lxc1-sxc1'
1 On MIPS targets, make '-mlxc1-sxc1' the default when no
1 '-mno-lxc1-sxc1' option is passed. This is the default.
1
1 '--without-lxc1-sxc1'
1 On MIPS targets, make '-mno-lxc1-sxc1' the default when no
1 '-mlxc1-sxc1' option is passed. The indexed load/store
1 instructions are not directly a problem but can lead to unexpected
1 behaviour when deployed in an application intended for a 32-bit
1 address space but run on a 64-bit processor. The issue is seen
1 because all known MIPS 64-bit Linux kernels execute o32 and n32
1 applications with 64-bit addressing enabled which affects the
1 overflow behaviour of the indexed addressing mode. GCC will assume
1 that ordinary 32-bit arithmetic overflow behaviour is the same
1 whether performed as an 'addu' instruction or as part of the
1 address calculation in 'lwxc1' type instructions. This assumption
1 holds true in a pure 32-bit environment and can hold true in a
1 64-bit environment if the address space is accurately set to be
1 32-bit for o32 and n32.
1
1 '--with-madd4'
1 On MIPS targets, make '-mmadd4' the default when no '-mno-madd4'
1 option is passed. This is the default.
1
1 '--without-madd4'
1 On MIPS targets, make '-mno-madd4' the default when no '-mmadd4'
1 option is passed. The 'madd4' instruction family can be
1 problematic when targeting a combination of cores that implement
1 these instructions differently. There are two known cores that
1 implement these as fused operations instead of unfused (where
1 unfused is normally expected). Disabling these instructions is the
1 only way to ensure compatible code is generated; this will incur a
1 performance penalty.
1
1 '--with-mips-plt'
1 On MIPS targets, make use of copy relocations and PLTs. These
1 features are extensions to the traditional SVR4-based MIPS ABIs and
1 require support from GNU binutils and the runtime C library.
1
1 '--enable-__cxa_atexit'
1 Define if you want to use __cxa_atexit, rather than atexit, to
1 register C++ destructors for local statics and global objects.
1 This is essential for fully standards-compliant handling of
1 destructors, but requires __cxa_atexit in libc. This option is
1 currently only available on systems with GNU libc. When enabled,
1 this will cause '-fuse-cxa-atexit' to be passed by default.
1
1 '--enable-gnu-indirect-function'
1 Define if you want to enable the 'ifunc' attribute. This option is
1 currently only available on systems with GNU libc on certain
1 targets.
1
1 '--enable-target-optspace'
1 Specify that target libraries should be optimized for code space
1 instead of code speed. This is the default for the m32r platform.
1
1 '--with-cpp-install-dir=DIRNAME'
1 Specify that the user visible 'cpp' program should be installed in
1 'PREFIX/DIRNAME/cpp', in addition to BINDIR.
1
1 '--enable-comdat'
1 Enable COMDAT group support. This is primarily used to override
1 the automatically detected value.
1
1 '--enable-initfini-array'
1 Force the use of sections '.init_array' and '.fini_array' (instead
1 of '.init' and '.fini') for constructors and destructors. Option
1 '--disable-initfini-array' has the opposite effect. If neither
1 option is specified, the configure script will try to guess whether
1 the '.init_array' and '.fini_array' sections are supported and, if
1 they are, use them.
1
1 '--enable-link-mutex'
1 When building GCC, use a mutex to avoid linking the compilers for
1 multiple languages at the same time, to avoid thrashing on build
1 systems with limited free memory. The default is not to use such a
1 mutex.
1
1 '--enable-maintainer-mode'
1 The build rules that regenerate the Autoconf and Automake output
1 files as well as the GCC master message catalog 'gcc.pot' are
1 normally disabled. This is because it can only be rebuilt if the
1 complete source tree is present. If you have changed the sources
1 and want to rebuild the catalog, configuring with
1 '--enable-maintainer-mode' will enable this. Note that you need a
1 recent version of the 'gettext' tools to do so.
1
1 '--disable-bootstrap'
1 For a native build, the default configuration is to perform a
1 3-stage bootstrap of the compiler when 'make' is invoked, testing
1 that GCC can compile itself correctly. If you want to disable this
1 process, you can configure with '--disable-bootstrap'.
1
1 '--enable-bootstrap'
1 In special cases, you may want to perform a 3-stage build even if
1 the target and host triplets are different. This is possible when
1 the host can run code compiled for the target (e.g. host is
1 i686-linux, target is i486-linux). Starting from GCC 4.2, to do
1 this you have to configure explicitly with '--enable-bootstrap'.
1
1 '--enable-generated-files-in-srcdir'
1 Neither the .c and .h files that are generated from Bison and flex
1 nor the info manuals and man pages that are built from the .texi
1 files are present in the repository development tree. When
1 building GCC from that development tree, or from one of our
1 snapshots, those generated files are placed in your build
1 directory, which allows for the source to be in a readonly
1 directory.
1
1 If you configure with '--enable-generated-files-in-srcdir' then
1 those generated files will go into the source directory. This is
1 mainly intended for generating release or prerelease tarballs of
1 the GCC sources, since it is not a requirement that the users of
1 source releases to have flex, Bison, or makeinfo.
1
1 '--enable-version-specific-runtime-libs'
1 Specify that runtime libraries should be installed in the compiler
1 specific subdirectory ('LIBDIR/gcc') rather than the usual places.
1 In addition, 'libstdc++''s include files will be installed into
1 'LIBDIR' unless you overruled it by using
1 '--with-gxx-include-dir=DIRNAME'. Using this option is
1 particularly useful if you intend to use several versions of GCC in
1 parallel. This is currently supported by 'libgfortran',
1 'libstdc++', and 'libobjc'.
1
1 '--with-aix-soname='aix', 'svr4' or 'both''
1 Traditional AIX shared library versioning (versioned 'Shared
1 Object' files as members of unversioned 'Archive Library' files
1 named 'lib.a') causes numerous headaches for package managers.
1 However, 'Import Files' as members of 'Archive Library' files allow
1 for *filename-based versioning* of shared libraries as seen on
1 Linux/SVR4, where this is called the "SONAME". But as they prevent
1 static linking, 'Import Files' may be used with 'Runtime Linking'
1 only, where the linker does search for 'libNAME.so' before
1 'libNAME.a' library filenames with the '-lNAME' linker flag.
1
1 For detailed information please refer to the AIX ld Command
1 reference.
1
1 As long as shared library creation is enabled, upon:
1 '--with-aix-soname=aix'
1 '--with-aix-soname=both'
1 A (traditional AIX) 'Shared Archive Library' file is created:
1 * using the 'libNAME.a' filename scheme
1 * with the 'Shared Object' file as archive member named
1 'libNAME.so.V' (except for 'libgcc_s', where the 'Shared
1 Object' file is named 'shr.o' for backwards
1 compatibility), which
1 - is used for runtime loading from inside the
1 'libNAME.a' file
1 - is used for dynamic loading via
1 'dlopen("libNAME.a(libNAME.so.V)", RTLD_MEMBER)'
1 - is used for shared linking
1 - is used for static linking, so no separate 'Static
1 Archive Library' file is needed
1 '--with-aix-soname=both'
1 '--with-aix-soname=svr4'
1 A (second) 'Shared Archive Library' file is created:
1 * using the 'libNAME.so.V' filename scheme
1 * with the 'Shared Object' file as archive member named
1 'shr.o', which
1 - is created with the '-G linker flag'
1 - has the 'F_LOADONLY' flag set
1 - is used for runtime loading from inside the
1 'libNAME.so.V' file
1 - is used for dynamic loading via
1 'dlopen("libNAME.so.V(shr.o)", RTLD_MEMBER)'
1 * with the 'Import File' as archive member named 'shr.imp',
1 which
1 - refers to 'libNAME.so.V(shr.o)' as the "SONAME", to
1 be recorded in the 'Loader Section' of subsequent
1 binaries
1 - indicates whether 'libNAME.so.V(shr.o)' is 32 or 64
1 bit
1 - lists all the public symbols exported by
1 'lib.so.V(shr.o)', eventually decorated with the
1 ''weak' Keyword'
1 - is necessary for shared linking against
1 'lib.so.V(shr.o)'
1 A symbolic link using the 'libNAME.so' filename scheme is
1 created:
1 * pointing to the 'libNAME.so.V' 'Shared Archive Library'
1 file
1 * to permit the 'ld Command' to find 'lib.so.V(shr.imp)'
1 via the '-lNAME' argument (requires 'Runtime Linking' to
1 be enabled)
1 * to permit dynamic loading of 'lib.so.V(shr.o)' without
1 the need to specify the version number via
1 'dlopen("libNAME.so(shr.o)", RTLD_MEMBER)'
1
1 As long as static library creation is enabled, upon:
1 '--with-aix-soname=svr4'
1 A 'Static Archive Library' is created:
1 * using the 'libNAME.a' filename scheme
1 * with all the 'Static Object' files as archive members,
1 which
1 - are used for static linking
1
1 While the aix-soname='svr4' option does not create 'Shared Object'
1 files as members of unversioned 'Archive Library' files any more,
1 package managers still are responsible to transfer 'Shared Object'
1 files found as member of a previously installed unversioned
1 'Archive Library' file into the newly installed 'Archive Library'
1 file with the same filename.
1
1 _WARNING:_ Creating 'Shared Object' files with 'Runtime Linking'
1 enabled may bloat the TOC, eventually leading to 'TOC overflow'
1 errors, requiring the use of either the '-Wl,-bbigtoc' linker flag
1 (seen to break with the 'GDB' debugger) or some of the TOC-related
11 compiler flags, ⇒RS/6000 and PowerPC Options (gcc)RS/6000 and
PowerPC Options.
1
1 '--with-aix-soname' is currently supported by 'libgcc_s' only, so
1 this option is still experimental and not for normal use yet.
1
1 Default is the traditional behavior '--with-aix-soname='aix''.
1
1 '--enable-languages=LANG1,LANG2,...'
1 Specify that only a particular subset of compilers and their
1 runtime libraries should be built. For a list of valid values for
1 LANGN you can issue the following command in the 'gcc' directory of
1 your GCC source tree:
1 grep ^language= */config-lang.in
1 Currently, you can use any of the following: 'all', 'default',
1 'ada', 'c', 'c++', 'fortran', 'go', 'jit', 'lto', 'objc',
1 'obj-c++'. Building the Ada compiler has special requirements, see
1 below. If you do not pass this flag, or specify the option
1 'default', then the default languages available in the 'gcc'
1 sub-tree will be configured. Ada, Go, Jit, and Objective-C++ are
1 not default languages. LTO is not a default language, but is built
1 by default because '--enable-lto' is enabled by default. The other
1 languages are default languages. If 'all' is specified, then all
1 available languages are built. An exception is 'jit' language,
1 which requires '--enable-host-shared' to be included with 'all'.
1
1 '--enable-stage1-languages=LANG1,LANG2,...'
1 Specify that a particular subset of compilers and their runtime
1 libraries should be built with the system C compiler during stage 1
1 of the bootstrap process, rather than only in later stages with the
1 bootstrapped C compiler. The list of valid values is the same as
1 for '--enable-languages', and the option 'all' will select all of
1 the languages enabled by '--enable-languages'. This option is
1 primarily useful for GCC development; for instance, when a
1 development version of the compiler cannot bootstrap due to
1 compiler bugs, or when one is debugging front ends other than the C
1 front end. When this option is used, one can then build the target
1 libraries for the specified languages with the stage-1 compiler by
1 using 'make stage1-bubble all-target', or run the testsuite on the
1 stage-1 compiler for the specified languages using 'make
1 stage1-start check-gcc'.
1
1 '--disable-libada'
1 Specify that the run-time libraries and tools used by GNAT should
1 not be built. This can be useful for debugging, or for
1 compatibility with previous Ada build procedures, when it was
1 required to explicitly do a 'make -C gcc gnatlib_and_tools'.
1
1 '--disable-libsanitizer'
1 Specify that the run-time libraries for the various sanitizers
1 should not be built.
1
1 '--disable-libssp'
1 Specify that the run-time libraries for stack smashing protection
1 should not be built or linked against. On many targets library
1 support is provided by the C library instead.
1
1 '--disable-libquadmath'
1 Specify that the GCC quad-precision math library should not be
1 built. On some systems, the library is required to be linkable
1 when building the Fortran front end, unless
1 '--disable-libquadmath-support' is used.
1
1 '--disable-libquadmath-support'
1 Specify that the Fortran front end and 'libgfortran' do not add
1 support for 'libquadmath' on systems supporting it.
1
1 '--disable-libgomp'
1 Specify that the GNU Offloading and Multi Processing Runtime
1 Library should not be built.
1
1 '--disable-libvtv'
1 Specify that the run-time libraries used by vtable verification
1 should not be built.
1
1 '--with-dwarf2'
1 Specify that the compiler should use DWARF 2 debugging information
1 as the default.
1
1 '--with-advance-toolchain=AT'
1 On 64-bit PowerPC Linux systems, configure the compiler to use the
1 header files, library files, and the dynamic linker from the
1 Advance Toolchain release AT instead of the default versions that
1 are provided by the Linux distribution. In general, this option is
1 intended for the developers of GCC, and it is not intended for
1 general use.
1
1 '--enable-targets=all'
1 '--enable-targets=TARGET_LIST'
1 Some GCC targets, e.g. powerpc64-linux, build bi-arch compilers.
1 These are compilers that are able to generate either 64-bit or
1 32-bit code. Typically, the corresponding 32-bit target, e.g.
1 powerpc-linux for powerpc64-linux, only generates 32-bit code.
1 This option enables the 32-bit target to be a bi-arch compiler,
1 which is useful when you want a bi-arch compiler that defaults to
1 32-bit, and you are building a bi-arch or multi-arch binutils in a
1 combined tree. On mips-linux, this will build a tri-arch compiler
1 (ABI o32/n32/64), defaulted to o32. Currently, this option only
1 affects sparc-linux, powerpc-linux, x86-linux, mips-linux and
1 s390-linux.
1
1 '--enable-default-pie'
1 Turn on '-fPIE' and '-pie' by default.
1
1 '--enable-secureplt'
1 This option enables '-msecure-plt' by default for powerpc-linux.
11 ⇒RS/6000 and PowerPC Options (gcc)RS/6000 and PowerPC
Options,
1
1 '--enable-default-ssp'
1 Turn on '-fstack-protector-strong' by default.
1
1 '--enable-cld'
1 This option enables '-mcld' by default for 32-bit x86 targets.
1 ⇒i386 and x86-64 Options (gcc)i386 and x86-64 Options,
1
1 '--enable-win32-registry'
1 '--enable-win32-registry=KEY'
1 '--disable-win32-registry'
1 The '--enable-win32-registry' option enables Microsoft
1 Windows-hosted GCC to look up installations paths in the registry
1 using the following key:
1
1 HKEY_LOCAL_MACHINE\SOFTWARE\Free Software Foundation\KEY
1
1 KEY defaults to GCC version number, and can be overridden by the
1 '--enable-win32-registry=KEY' option. Vendors and distributors who
1 use custom installers are encouraged to provide a different key,
1 perhaps one comprised of vendor name and GCC version number, to
1 avoid conflict with existing installations. This feature is
1 enabled by default, and can be disabled by
1 '--disable-win32-registry' option. This option has no effect on
1 the other hosts.
1
1 '--nfp'
1 Specify that the machine does not have a floating point unit. This
1 option only applies to 'm68k-sun-sunosN'. On any other system,
1 '--nfp' has no effect.
1
1 '--enable-werror'
1 '--disable-werror'
1 '--enable-werror=yes'
1 '--enable-werror=no'
1 When you specify this option, it controls whether certain files in
1 the compiler are built with '-Werror' in bootstrap stage2 and
1 later. If you don't specify it, '-Werror' is turned on for the
1 main development trunk. However it defaults to off for release
1 branches and final releases. The specific files which get
1 '-Werror' are controlled by the Makefiles.
1
1 '--enable-checking'
1 '--disable-checking'
1 '--enable-checking=LIST'
1 This option controls performing internal consistency checks in the
1 compiler. It does not change the generated code, but adds error
1 checking of the requested complexity. This slows down the compiler
1 and may only work properly if you are building the compiler with
1 GCC.
1
1 When the option is not specified, the active set of checks depends
1 on context. Namely, bootstrap stage 1 defaults to
1 '--enable-checking=yes', builds from release branches or release
1 archives default to '--enable-checking=release', and otherwise
1 '--enable-checking=yes,extra' is used. When the option is
1 specified without a LIST, the result is the same as
1 '--enable-checking=yes'. Likewise, '--disable-checking' is
1 equivalent to '--enable-checking=no'.
1
1 The categories of checks available in LIST are 'yes' (most common
1 checks 'assert,misc,gc,gimple,rtlflag,runtime,tree,types'), 'no'
1 (no checks at all), 'all' (all but 'valgrind'), 'release' (cheapest
1 checks 'assert,runtime') or 'none' (same as 'no'). 'release'
1 checks are always on and to disable them '--disable-checking' or
1 '--enable-checking=no[,<other checks>]' must be explicitly
1 requested. Disabling assertions makes the compiler and runtime
1 slightly faster but increases the risk of undetected internal
1 errors causing wrong code to be generated.
1
1 Individual checks can be enabled with these flags: 'assert', 'df',
1 'extra', 'fold', 'gc', 'gcac', 'gimple', 'misc', 'rtl', 'rtlflag',
1 'runtime', 'tree', 'types' and 'valgrind'. 'extra' extends 'misc'
1 checking with extra checks that might affect code generation and
1 should therefore not differ between stage1 and later stages in
1 bootstrap.
1
1 The 'valgrind' check requires the external 'valgrind' simulator,
1 available from <http://valgrind.org/>. The 'rtl' checks are
1 expensive and the 'df', 'gcac' and 'valgrind' checks are very
1 expensive.
1
1 '--disable-stage1-checking'
1 '--enable-stage1-checking'
1 '--enable-stage1-checking=LIST'
1 This option affects only bootstrap build. If no
1 '--enable-checking' option is specified the stage1 compiler is
1 built with 'yes' checking enabled, otherwise the stage1 checking
1 flags are the same as specified by '--enable-checking'. To build
1 the stage1 compiler with different checking options use
1 '--enable-stage1-checking'. The list of checking options is the
1 same as for '--enable-checking'. If your system is too slow or too
1 small to bootstrap a released compiler with checking for stage1
1 enabled, you can use '--disable-stage1-checking' to disable
1 checking for the stage1 compiler.
1
1 '--enable-coverage'
1 '--enable-coverage=LEVEL'
1 With this option, the compiler is built to collect self coverage
1 information, every time it is run. This is for internal
1 development purposes, and only works when the compiler is being
1 built with gcc. The LEVEL argument controls whether the compiler
1 is built optimized or not, values are 'opt' and 'noopt'. For
1 coverage analysis you want to disable optimization, for performance
1 analysis you want to enable optimization. When coverage is
1 enabled, the default level is without optimization.
1
1 '--enable-gather-detailed-mem-stats'
1 When this option is specified more detailed information on memory
1 allocation is gathered. This information is printed when using
1 '-fmem-report'.
1
1 '--enable-valgrind-annotations'
1 Mark selected memory related operations in the compiler when run
1 under valgrind to suppress false positives.
1
1 '--enable-nls'
1 '--disable-nls'
1 The '--enable-nls' option enables Native Language Support (NLS),
1 which lets GCC output diagnostics in languages other than American
1 English. Native Language Support is enabled by default if not
1 doing a canadian cross build. The '--disable-nls' option disables
1 NLS.
1
1 '--with-included-gettext'
1 If NLS is enabled, the '--with-included-gettext' option causes the
1 build procedure to prefer its copy of GNU 'gettext'.
1
1 '--with-catgets'
1 If NLS is enabled, and if the host lacks 'gettext' but has the
1 inferior 'catgets' interface, the GCC build procedure normally
1 ignores 'catgets' and instead uses GCC's copy of the GNU 'gettext'
1 library. The '--with-catgets' option causes the build procedure to
1 use the host's 'catgets' in this situation.
1
1 '--with-libiconv-prefix=DIR'
1 Search for libiconv header files in 'DIR/include' and libiconv
1 library files in 'DIR/lib'.
1
1 '--enable-obsolete'
1 Enable configuration for an obsoleted system. If you attempt to
1 configure GCC for a system (build, host, or target) which has been
1 obsoleted, and you do not specify this flag, configure will halt
1 with an error message.
1
1 All support for systems which have been obsoleted in one release of
1 GCC is removed entirely in the next major release, unless someone
1 steps forward to maintain the port.
1
1 '--enable-decimal-float'
1 '--enable-decimal-float=yes'
1 '--enable-decimal-float=no'
1 '--enable-decimal-float=bid'
1 '--enable-decimal-float=dpd'
1 '--disable-decimal-float'
1 Enable (or disable) support for the C decimal floating point
1 extension that is in the IEEE 754-2008 standard. This is enabled
1 by default only on PowerPC, i386, and x86_64 GNU/Linux systems.
1 Other systems may also support it, but require the user to
1 specifically enable it. You can optionally control which decimal
1 floating point format is used (either 'bid' or 'dpd'). The 'bid'
1 (binary integer decimal) format is default on i386 and x86_64
1 systems, and the 'dpd' (densely packed decimal) format is default
1 on PowerPC systems.
1
1 '--enable-fixed-point'
1 '--disable-fixed-point'
1 Enable (or disable) support for C fixed-point arithmetic. This
1 option is enabled by default for some targets (such as MIPS) which
1 have hardware-support for fixed-point operations. On other
1 targets, you may enable this option manually.
1
1 '--with-long-double-128'
1 Specify if 'long double' type should be 128-bit by default on
1 selected GNU/Linux architectures. If using
1 '--without-long-double-128', 'long double' will be by default
1 64-bit, the same as 'double' type. When neither of these configure
1 options are used, the default will be 128-bit 'long double' when
1 built against GNU C Library 2.4 and later, 64-bit 'long double'
1 otherwise.
1
1 '--with-long-double-format=ibm'
1 '--with-long-double-format=ieee'
1 Specify whether 'long double' uses the IBM extended double format
1 or the IEEE 128-bit floating point format on PowerPC Linux systems.
1 This configuration switch will only work on little endian PowerPC
1 Linux systems and on big endian 64-bit systems where the default
1 cpu is at least power7 (i.e. '--with-cpu=power7',
1 '--with-cpu=power8', or '--with-cpu=power9' is used).
1
1 If you use the '--with-long-double-64' configuration option, the
1 '--with-long-double-format=ibm' and
1 '--with-long-double-format=ieee' options are ignored.
1
1 The default 'long double' format is to use IBM extended double.
1 Until all of the libraries are converted to use IEEE 128-bit
1 floating point, it is not recommended to use
1 '--with-long-double-format=ieee'.
1
1 On little endian PowerPC Linux systems, if you explicitly set the
1 'long double' type, it will build multilibs to allow you to select
1 either 'long double' format, unless you disable multilibs with the
1 '--disable-multilib' option. At present, 'long double' multilibs
1 are not built on big endian PowerPC Linux systems. If you are
1 building multilibs, you will need to configure the compiler using
1 the '--with-system-zlib' option.
1
1 If you do not set the 'long double' type explicitly, no multilibs
1 will be generated.
1
1 '--enable-fdpic'
1 On SH Linux systems, generate ELF FDPIC code.
1
1 '--with-gmp=PATHNAME'
1 '--with-gmp-include=PATHNAME'
1 '--with-gmp-lib=PATHNAME'
1 '--with-mpfr=PATHNAME'
1 '--with-mpfr-include=PATHNAME'
1 '--with-mpfr-lib=PATHNAME'
1 '--with-mpc=PATHNAME'
1 '--with-mpc-include=PATHNAME'
1 '--with-mpc-lib=PATHNAME'
1 If you want to build GCC but do not have the GMP library, the MPFR
1 library and/or the MPC library installed in a standard location and
1 do not have their sources present in the GCC source tree then you
1 can explicitly specify the directory where they are installed
1 ('--with-gmp=GMPINSTALLDIR', '--with-mpfr=MPFRINSTALLDIR',
1 '--with-mpc=MPCINSTALLDIR'). The '--with-gmp=GMPINSTALLDIR' option
1 is shorthand for '--with-gmp-lib=GMPINSTALLDIR/lib' and
1 '--with-gmp-include=GMPINSTALLDIR/include'. Likewise the
1 '--with-mpfr=MPFRINSTALLDIR' option is shorthand for
1 '--with-mpfr-lib=MPFRINSTALLDIR/lib' and
1 '--with-mpfr-include=MPFRINSTALLDIR/include', also the
1 '--with-mpc=MPCINSTALLDIR' option is shorthand for
1 '--with-mpc-lib=MPCINSTALLDIR/lib' and
1 '--with-mpc-include=MPCINSTALLDIR/include'. If these shorthand
1 assumptions are not correct, you can use the explicit include and
1 lib options directly. You might also need to ensure the shared
1 libraries can be found by the dynamic linker when building and
1 using GCC, for example by setting the runtime shared library path
1 variable ('LD_LIBRARY_PATH' on GNU/Linux and Solaris systems).
1
1 These flags are applicable to the host platform only. When
1 building a cross compiler, they will not be used to configure
1 target libraries.
1
1 '--with-isl=PATHNAME'
1 '--with-isl-include=PATHNAME'
1 '--with-isl-lib=PATHNAME'
1 If you do not have the isl library installed in a standard location
1 and you want to build GCC, you can explicitly specify the directory
1 where it is installed ('--with-isl=ISLINSTALLDIR'). The
1 '--with-isl=ISLINSTALLDIR' option is shorthand for
1 '--with-isl-lib=ISLINSTALLDIR/lib' and
1 '--with-isl-include=ISLINSTALLDIR/include'. If this shorthand
1 assumption is not correct, you can use the explicit include and lib
1 options directly.
1
1 These flags are applicable to the host platform only. When
1 building a cross compiler, they will not be used to configure
1 target libraries.
1
1 '--with-stage1-ldflags=FLAGS'
1 This option may be used to set linker flags to be used when linking
1 stage 1 of GCC. These are also used when linking GCC if configured
1 with '--disable-bootstrap'. If '--with-stage1-libs' is not set to
1 a value, then the default is '-static-libstdc++ -static-libgcc', if
1 supported.
1
1 '--with-stage1-libs=LIBS'
1 This option may be used to set libraries to be used when linking
1 stage 1 of GCC. These are also used when linking GCC if configured
1 with '--disable-bootstrap'.
1
1 '--with-boot-ldflags=FLAGS'
1 This option may be used to set linker flags to be used when linking
1 stage 2 and later when bootstrapping GCC. If -with-boot-libs is not
1 is set to a value, then the default is '-static-libstdc++
1 -static-libgcc'.
1
1 '--with-boot-libs=LIBS'
1 This option may be used to set libraries to be used when linking
1 stage 2 and later when bootstrapping GCC.
1
1 '--with-debug-prefix-map=MAP'
1 Convert source directory names using '-fdebug-prefix-map' when
1 building runtime libraries. 'MAP' is a space-separated list of
1 maps of the form 'OLD=NEW'.
1
1 '--enable-linker-build-id'
1 Tells GCC to pass '--build-id' option to the linker for all final
1 links (links performed without the '-r' or '--relocatable' option),
1 if the linker supports it. If you specify
1 '--enable-linker-build-id', but your linker does not support
1 '--build-id' option, a warning is issued and the
1 '--enable-linker-build-id' option is ignored. The default is off.
1
1 '--with-linker-hash-style=CHOICE'
1 Tells GCC to pass '--hash-style=CHOICE' option to the linker for
1 all final links. CHOICE can be one of 'sysv', 'gnu', and 'both'
1 where 'sysv' is the default.
1
1 '--enable-gnu-unique-object'
1 '--disable-gnu-unique-object'
1 Tells GCC to use the gnu_unique_object relocation for C++ template
1 static data members and inline function local statics. Enabled by
1 default for a toolchain with an assembler that accepts it and GLIBC
1 2.11 or above, otherwise disabled.
1
1 '--with-diagnostics-color=CHOICE'
1 Tells GCC to use CHOICE as the default for '-fdiagnostics-color='
1 option (if not used explicitly on the command line). CHOICE can be
1 one of 'never', 'auto', 'always', and 'auto-if-env' where 'auto' is
1 the default. 'auto-if-env' means that '-fdiagnostics-color=auto'
1 will be the default if 'GCC_COLORS' is present and non-empty in the
1 environment, and '-fdiagnostics-color=never' otherwise.
1
1 '--enable-lto'
1 '--disable-lto'
1 Enable support for link-time optimization (LTO). This is enabled by
1 default, and may be disabled using '--disable-lto'.
1
1 '--enable-linker-plugin-configure-flags=FLAGS'
1 '--enable-linker-plugin-flags=FLAGS'
1 By default, linker plugins (such as the LTO plugin) are built for
1 the host system architecture. For the case that the linker has a
1 different (but run-time compatible) architecture, these flags can
1 be specified to build plugins that are compatible to the linker.
1 For example, if you are building GCC for a 64-bit x86_64
1 ('x86_64-unknown-linux-gnu') host system, but have a 32-bit x86
1 GNU/Linux ('i686-pc-linux-gnu') linker executable (which is
1 executable on the former system), you can configure GCC as follows
1 for getting compatible linker plugins:
1
1 % SRCDIR/configure \
1 --host=x86_64-unknown-linux-gnu \
1 --enable-linker-plugin-configure-flags=--host=i686-pc-linux-gnu \
1 --enable-linker-plugin-flags='CC=gcc\ -m32\ -Wl,-rpath,[...]/i686-pc-linux-gnu/lib'
1
1 '--with-plugin-ld=PATHNAME'
1 Enable an alternate linker to be used at link-time optimization
1 (LTO) link time when '-fuse-linker-plugin' is enabled. This linker
1 should have plugin support such as gold starting with version 2.20
1 or GNU ld starting with version 2.21. See '-fuse-linker-plugin'
1 for details.
1
1 '--enable-canonical-system-headers'
1 '--disable-canonical-system-headers'
1 Enable system header path canonicalization for 'libcpp'. This can
1 produce shorter header file paths in diagnostics and dependency
1 output files, but these changed header paths may conflict with some
1 compilation environments. Enabled by default, and may be disabled
1 using '--disable-canonical-system-headers'.
1
1 '--with-glibc-version=MAJOR.MINOR'
1 Tell GCC that when the GNU C Library (glibc) is used on the target
1 it will be version MAJOR.MINOR or later. Normally this can be
1 detected from the C library's header files, but this option may be
1 needed when bootstrapping a cross toolchain without the header
1 files available for building the initial bootstrap compiler.
1
1 If GCC is configured with some multilibs that use glibc and some
1 that do not, this option applies only to the multilibs that use
1 glibc. However, such configurations may not work well as not all
1 the relevant configuration in GCC is on a per-multilib basis.
1
1 '--enable-as-accelerator-for=TARGET'
1 Build as offload target compiler. Specify offload host triple by
1 TARGET.
1
1 '--enable-offload-targets=TARGET1[=PATH1],...,TARGETN[=PATHN]'
1 Enable offloading to targets TARGET1, ..., TARGETN. Offload
1 compilers are expected to be already installed. Default search
1 path for them is 'EXEC-PREFIX', but it can be changed by specifying
1 paths PATH1, ..., PATHN.
1
1 % SRCDIR/configure \
1 --enable-offload-target=i686-unknown-linux-gnu=/path/to/i686/compiler,x86_64-pc-linux-gnu
1
1 If 'hsa' is specified as one of the targets, the compiler will be
1 built with support for HSA GPU accelerators. Because the same
1 compiler will emit the accelerator code, no path should be
1 specified.
1
1 '--with-hsa-runtime=PATHNAME'
1 '--with-hsa-runtime-include=PATHNAME'
1 '--with-hsa-runtime-lib=PATHNAME'
1
1 If you configure GCC with HSA offloading but do not have the HSA
1 run-time library installed in a standard location then you can
1 explicitly specify the directory where they are installed. The
1 '--with-hsa-runtime=HSAINSTALLDIR' option is a shorthand for
1 '--with-hsa-runtime-lib=HSAINSTALLDIR/lib' and
1 '--with-hsa-runtime-include=HSAINSTALLDIR/include'.
1
1 '--enable-cet'
1 '--disable-cet'
1 Enable building target run-time libraries with control-flow
1 instrumentation, see '-fcf-protection' option. When '--enable-cet'
1 is specified target libraries are configured to add
1 '-fcf-protection' and, if needed, other target specific options to
1 a set of building options.
1
1 The option is disabled by default. When '--enable-cet=auto' is
1 used, it is enabled on Linux/x86 if target binutils supports 'Intel
1 CET' instructions and disabled otherwise. In this case the target
1 libraries are configured to get additional '-fcf-protection'
1 option.
1
1 Cross-Compiler-Specific Options
1 -------------------------------
1
1 The following options only apply to building cross compilers.
1
1 '--with-sysroot'
1 '--with-sysroot=DIR'
1 Tells GCC to consider DIR as the root of a tree that contains (a
1 subset of) the root filesystem of the target operating system.
1 Target system headers, libraries and run-time object files will be
1 searched for in there. More specifically, this acts as if
1 '--sysroot=DIR' was added to the default options of the built
1 compiler. The specified directory is not copied into the install
1 tree, unlike the options '--with-headers' and '--with-libs' that
1 this option obsoletes. The default value, in case '--with-sysroot'
1 is not given an argument, is '${gcc_tooldir}/sys-root'. If the
1 specified directory is a subdirectory of '${exec_prefix}', then it
1 will be found relative to the GCC binaries if the installation tree
1 is moved.
1
1 This option affects the system root for the compiler used to build
1 target libraries (which runs on the build system) and the compiler
1 newly installed with 'make install'; it does not affect the
1 compiler which is used to build GCC itself.
1
1 If you specify the '--with-native-system-header-dir=DIRNAME' option
1 then the compiler will search that directory within DIRNAME for
1 native system headers rather than the default '/usr/include'.
1
1 '--with-build-sysroot'
1 '--with-build-sysroot=DIR'
1 Tells GCC to consider DIR as the system root (see '--with-sysroot')
1 while building target libraries, instead of the directory specified
1 with '--with-sysroot'. This option is only useful when you are
1 already using '--with-sysroot'. You can use '--with-build-sysroot'
1 when you are configuring with '--prefix' set to a directory that is
1 different from the one in which you are installing GCC and your
1 target libraries.
1
1 This option affects the system root for the compiler used to build
1 target libraries (which runs on the build system); it does not
1 affect the compiler which is used to build GCC itself.
1
1 If you specify the '--with-native-system-header-dir=DIRNAME' option
1 then the compiler will search that directory within DIRNAME for
1 native system headers rather than the default '/usr/include'.
1
1 '--with-headers'
1 '--with-headers=DIR'
1 Deprecated in favor of '--with-sysroot'. Specifies that target
1 headers are available when building a cross compiler. The DIR
1 argument specifies a directory which has the target include files.
1 These include files will be copied into the 'gcc' install
1 directory. _This option with the DIR argument is required_ when
1 building a cross compiler, if 'PREFIX/TARGET/sys-include' doesn't
1 pre-exist. If 'PREFIX/TARGET/sys-include' does pre-exist, the DIR
1 argument may be omitted. 'fixincludes' will be run on these files
1 to make them compatible with GCC.
1
1 '--without-headers'
1 Tells GCC not use any target headers from a libc when building a
1 cross compiler. When crossing to GNU/Linux, you need the headers
1 so GCC can build the exception handling for libgcc.
1
1 '--with-libs'
1 '--with-libs="DIR1 DIR2 ... DIRN"'
1 Deprecated in favor of '--with-sysroot'. Specifies a list of
1 directories which contain the target runtime libraries. These
1 libraries will be copied into the 'gcc' install directory. If the
1 directory list is omitted, this option has no effect.
1
1 '--with-newlib'
1 Specifies that 'newlib' is being used as the target C library.
1 This causes '__eprintf' to be omitted from 'libgcc.a' on the
1 assumption that it will be provided by 'newlib'.
1
1 '--with-avrlibc'
1 Specifies that 'AVR-Libc' is being used as the target C library.
1 This causes float support functions like '__addsf3' to be omitted
1 from 'libgcc.a' on the assumption that it will be provided by
1 'libm.a'. For more technical details, cf. PR54461. This option
1 is only supported for the AVR target. It is not supported for
1 RTEMS configurations, which currently use newlib. The option is
1 supported since version 4.7.2 and is the default in 4.8.0 and
1 newer.
1
1 '--with-nds32-lib=LIBRARY'
1 Specifies that LIBRARY setting is used for building 'libgcc.a'.
1 Currently, the valid LIBRARY is 'newlib' or 'mculib'. This option
1 is only supported for the NDS32 target.
1
1 '--with-build-time-tools=DIR'
1 Specifies where to find the set of target tools (assembler, linker,
1 etc.) that will be used while building GCC itself. This option
1 can be useful if the directory layouts are different between the
1 system you are building GCC on, and the system where you will
1 deploy it.
1
1 For example, on an 'ia64-hp-hpux' system, you may have the GNU
1 assembler and linker in '/usr/bin', and the native tools in a
1 different path, and build a toolchain that expects to find the
1 native tools in '/usr/bin'.
1
1 When you use this option, you should ensure that DIR includes 'ar',
1 'as', 'ld', 'nm', 'ranlib' and 'strip' if necessary, and possibly
1 'objdump'. Otherwise, GCC may use an inconsistent set of tools.
1
1 Overriding 'configure' test results
1 ...................................
1
1 Sometimes, it might be necessary to override the result of some
1 'configure' test, for example in order to ease porting to a new system
1 or work around a bug in a test. The toplevel 'configure' script
1 provides three variables for this:
1
1 'build_configargs'
1 The contents of this variable is passed to all build 'configure'
1 scripts.
1
1 'host_configargs'
1 The contents of this variable is passed to all host 'configure'
1 scripts.
1
1 'target_configargs'
1 The contents of this variable is passed to all target 'configure'
1 scripts.
1
1 In order to avoid shell and 'make' quoting issues for complex
1 overrides, you can pass a setting for 'CONFIG_SITE' and set variables in
1 the site file.
1
1 Objective-C-Specific Options
1 ----------------------------
1
1 The following options apply to the build of the Objective-C runtime
1 library.
1
1 '--enable-objc-gc'
1 Specify that an additional variant of the GNU Objective-C runtime
1 library is built, using an external build of the
1 Boehm-Demers-Weiser garbage collector
1 (<http://www.hboehm.info/gc/>). This library needs to be available
1 for each multilib variant, unless configured with
1 '--enable-objc-gc='auto'' in which case the build of the additional
1 runtime library is skipped when not available and the build
1 continues.
1
1 '--with-target-bdw-gc=LIST'
1 '--with-target-bdw-gc-include=LIST'
1 '--with-target-bdw-gc-lib=LIST'
1 Specify search directories for the garbage collector header files
1 and libraries. LIST is a comma separated list of key value pairs
1 of the form 'MULTILIBDIR=PATH', where the default multilib key is
1 named as '.' (dot), or is omitted (e.g.
1 '--with-target-bdw-gc=/opt/bdw-gc,32=/opt-bdw-gc32').
1
1 The options '--with-target-bdw-gc-include' and
1 '--with-target-bdw-gc-lib' must always be specified together for
1 each multilib variant and they take precedence over
1 '--with-target-bdw-gc'. If '--with-target-bdw-gc-include' is
1 missing values for a multilib, then the value for the default
1 multilib is used (e.g.
1 '--with-target-bdw-gc-include=/opt/bdw-gc/include'
1 '--with-target-bdw-gc-lib=/opt/bdw-gc/lib64,32=/opt-bdw-gc/lib32').
1 If none of these options are specified, the library is assumed in
1 default locations.
1