aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2012-11-14 21:29:15 +0000
committerMatthias Klose <doko@gcc.gnu.org>2012-11-14 21:29:15 +0000
commite0cdc09f6bea34f278f8bb82700676c5f5b1573c (patch)
tree798f236c1a228f52fb496d836f7871c8ddfaf6d5 /gcc/doc
parent46de9f5e3757fbcaea992772f7094bf93b0f8c35 (diff)
downloadgcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.zip
gcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.tar.gz
gcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.tar.bz2
invoke.texi: Document -print-multiarch.
2012-11-14 Matthias Klose <doko@ubuntu.com> * doc/invoke.texi: Document -print-multiarch. * doc/install.texi: Document --enable-multiarch. * doc/fragments.texi: Document MULTILIB_OSDIRNAMES, MULTIARCH_DIRNAME. * configure.ac: Add --enable-multiarch option. * configure: Regenerate. * Makefile.in (s-mlib): Pass MULTIARCH_DIRNAME to genmultilib. enable_multiarch, with_float: New macros. if_multiarch: New macro, define in terms of enable_multiarch. * genmultilib: Add new argument for the multiarch name. * gcc.c (multiarch_dir): Define. (for_each_path): Search for multiarch suffixes. (driver_handle_option): Handle multiarch option. (do_spec_1): Pass -imultiarch if defined. (main): Print multiarch. (set_multilib_dir): Separate multilib and multiarch names from multilib_select. (print_multilib_info): Ignore multiarch names in multilib_select. * incpath.c (add_standard_paths): Search the multiarch include dirs. * cppdefault.h (default_include): Document multiarch in multilib member. * cppdefault.c: [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an include directory for multiarch directories. * common.opt: New options --print-multiarch and -imultilib. * config.gcc <i[34567]86-*-linux* | x86_64-*-linux*> (tmake_file): Include i386/t-linux. <i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu> (tmake_file): Include i386/t-kfreebsd. <i[34567]86-*-gnu*> (tmake_file): Include i386/t-gnu. * config/i386/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES, define MULTIARCH_DIRNAME. * config/i386/t-gnu: New file. * config/i386/t-kfreebsd: Likewise. * config/i386/t-linux: Likewise. From-SVN: r193508
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/fragments.texi60
-rw-r--r--gcc/doc/install.texi9
-rw-r--r--gcc/doc/invoke.texi5
3 files changed, 74 insertions, 0 deletions
diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi
index f53df29..28cef68 100644
--- a/gcc/doc/fragments.texi
+++ b/gcc/doc/fragments.texi
@@ -93,6 +93,12 @@ Write one element in @code{MULTILIB_DIRNAMES} for each element in
default value will be @code{MULTILIB_OPTIONS}, with all slashes treated
as spaces.
+@code{MULTILIB_DIRNAMES} describes the multilib directories using GCC
+conventions and is applied to directories that are part of the GCC
+installation. When multilib-enabled, the compiler will add a
+subdirectory of the form @var{prefix}/@var{multilib} before each
+directory in the search path for libraries and crt files.
+
For example, if @code{MULTILIB_OPTIONS} is set to @samp{m68000/m68020
msoft-float}, then the default value of @code{MULTILIB_DIRNAMES} is
@samp{m68000 m68020 msoft-float}. You may specify a different value if
@@ -152,6 +158,60 @@ compiler. In that case, set @code{MULTILIB_EXTRA_OPTS} to be the list
of options to be used for all builds. If you set this, you should
probably set @code{CRTSTUFF_T_CFLAGS} to a dash followed by it.
+@findex MULTILIB_OSDIRNAMES
+@item MULTILIB_OSDIRNAMES
+If @code{MULTILIB_OPTIONS} is used, this variable specifies
+a list of subdirectory names, that are used to modify the search
+path depending on the chosen multilib. Unlike @code{MULTILIB_DIRNAMES},
+@code{MULTILIB_OSDIRNAMES} describes the multilib directories using
+operating systems conventions, and is applied to the directories such as
+@code{lib} or those in the @env{LIBRARY_PATH} environment variable.
+The format is either the same as of
+@code{MULTILIB_DIRNAMES}, or a set of mappings. When it is the same
+as @code{MULTILIB_DIRNAMES}, it describes the multilib directories
+using operating system conventions, rather than GCC conventions. When it is a set
+of mappings of the form @var{gccdir}=@var{osdir}, the left side gives
+the GCC convention and the right gives the equivalent OS defined
+location. If the @var{osdir} part begins with a @samp{!},
+GCC will not search in the non-multilib directory and use
+exclusively the multilib directory. Otherwise, the compiler will
+examine the search path for libraries and crt files twice; the first
+time it will add @var{multilib} to each directory in the search path,
+the second it will not.
+
+For configurations that support both multilib and multiarch,
+@code{MULTILIB_OSDIRNAMES} also encodes the multiarch name, thus
+subsuming @code{MULTIARCH_DIRNAME}. The multiarch name is appended to
+each directory name, separated by a colon (e.g.
+@samp{../lib32:i386-linux-gnu}).
+
+Each multiarch subdirectory will be searched before the corresponding OS
+multilib directory, for example @samp{/lib/i386-linux-gnu} before
+@samp{/lib/../lib32}. The multiarch name will also be used to modify the
+system header search path, as explained for @code{MULTIARCH_DIRNAME}.
+
+@findex MULTIARCH_DIRNAME
+@item MULTIARCH_DIRNAME
+This variable specifies the multiarch name for configurations that are
+multiarch-enabled but not multilibbed configurations.
+
+The multiarch name is used to augment the search path for libraries, crt
+files and system header files with additional locations. The compiler
+will add a multiarch subdirectory of the form
+@var{prefix}/@var{multiarch} before each directory in the library and
+crt search path. It will also add two directories
+@code{LOCAL_INCLUDE_DIR}/@var{multiarch} and
+@code{NATIVE_SYSTEM_HEADER_DIR}/@var{multiarch}) to the system header
+search path, respectively before @code{LOCAL_INCLUDE_DIR} and
+@code{NATIVE_SYSTEM_HEADER_DIR}.
+
+@code{MULTIARCH_DIRNAME} is not used for configurations that support
+both multilib and multiarch. In that case, multiarch names are encoded
+in @code{MULTILIB_OSDIRNAMES} instead.
+
+More documentation about multiarch can be found at
+@uref{http://wiki.debian.org/Multiarch}.
+
@findex SPECS
@item SPECS
Unfortunately, setting @code{MULTILIB_EXTRA_OPTS} is not enough, since
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index f158eb2..7396158 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1033,6 +1033,15 @@ libraries to support different target variants, calling
conventions, etc.@: should not be built. The default is to build a
predefined set of them.
+@item --enable-multiarch
+Specify whether to enable or disable multiarch support. The default is
+to check for glibc start files in a multiarch location, and enable it
+if the files are found. The auto detection is enabled for native builds,
+and for cross builds configured with @option{--with-sysroot}, and without
+@option{--with-native-system-header-dir}.
+More documentation about multiarch can be found at
+@uref{http://wiki.debian.org/Multiarch}.
+
Some targets provide finer-grained control over which multilibs are built
(e.g., @option{--disable-softfloat}):
@table @code
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 6f03a55..e019e3d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -6336,6 +6336,11 @@ sibling directories this prints e.g.@: @file{../lib64}, @file{../lib} or
@file{../lib32}, or if OS libraries are present in @file{lib/@var{subdir}}
subdirectories it prints e.g.@: @file{amd64}, @file{sparcv9} or @file{ev6}.
+@item -print-multiarch
+@opindex print-multiarch
+Print the path to OS libraries for the selected multiarch,
+relative to some @file{lib} subdirectory.
+
@item -print-prog-name=@var{program}
@opindex print-prog-name
Like @option{-print-file-name}, but searches for a program such as @samp{cpp}.