summaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-25 19:42:04 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-25 19:42:04 +0000
commita99be1654a402f14905861a44191ec273f38902a (patch)
treea777a9c833f5e8d7258fa7861d57d97cee80a26f /gcc/doc
parentbc81754c69d60809067492a570d6c95ae2bf4007 (diff)
downloadgcc-a99be1654a402f14905861a44191ec273f38902a.tar.gz
* gcc.c (option_map): Add --sysroot.
(process_command): Handle --sysroot. (display_help): Document it. * doc/cppopts.tex (-isysroot): Document. * doc/invoke.texi (--sysroot): Document. * doc/install.texi (--with-build-sysroot): Document. * Makefile.in (inhibit_libc): New variable. (INHIBIT_LIBC_CFLAGS): Likewise. (LIBGCC2_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS). (CRTSTUFF_CFLAGS): Include $(INHIBIT_LIBC_CFLAGS). ($(T)crtbegin.o): Do not use @inhibit_libc@. ($(T)crtend.o): Likewise. ($(T)crtbeginS.o): Do not use @inhibit_libc@. ($(T)crtendS.o): Likewise. ($(T)crtbeginT.o): Do not use @inhibit_libc@. ($(T)crtendT.o): Likewise. (stmp-fixinc): Do not complain about missing headers if inhibit_libc. * configure.ac (inhibit_libc): Set it to true/false. (--with-build-sysroot): New option. Use it to set SYSTEM_HEADER_DIR. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r--gcc/doc/cppopts.texi5
-rw-r--r--gcc/doc/install.texi10
-rw-r--r--gcc/doc/invoke.texi20
3 files changed, 34 insertions, 1 deletions
diff --git a/gcc/doc/cppopts.texi b/gcc/doc/cppopts.texi
index 80bbe50e690..2790e8c7734 100644
--- a/gcc/doc/cppopts.texi
+++ b/gcc/doc/cppopts.texi
@@ -478,6 +478,11 @@ Append @var{dir} to the prefix specified previously with
path. @option{-iwithprefixbefore} puts it in the same place @option{-I}
would; @option{-iwithprefix} puts it where @option{-idirafter} would.
+@item -isysroot @var{dir}
+@opindex isysroot
+This option is like the @option{--sysroot} option, but applies only to
+header files. See the @option{--sysroot} option for more information.
+
@item -isystem @var{dir}
@opindex isystem
Search @var{dir} for header files, after all directories specified by
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index ac046c7a7fa..2baf003b95c 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -1228,6 +1228,16 @@ in case @option{--with-sysroot} is not given an argument, is
subdirectory of @option{$@{exec_prefix@}}, then it will be found relative to
the GCC binaries if the installation tree is moved.
+@item --with-build-sysroot
+@itemx --with-build-sysroot=@var{dir}
+Tells GCC to consider @var{dir} as the system root (see
+@option{--with-sysroot}) while building the compiler itself, instead of
+the directory specified with @option{--with-sysroot}. This option is
+only useful when you are already using @option{--with-sysroot}. You
+can use @option{--with-build-sysroot} when you are configure with
+@option{--prefix} set to a directory that is different from the one in
+which you are installing GCC and your target libraries.
+
@item --with-headers
@itemx --with-headers=@var{dir}
Deprecated in favor of @option{--with-sysroot}.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 988f13b1dbd..f24505562a7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -349,6 +349,7 @@ Objective-C and Objective-C++ Dialects}.
-include @var{file} -imacros @var{file} @gol
-iprefix @var{file} -iwithprefix @var{dir} @gol
-iwithprefixbefore @var{dir} -isystem @var{dir} @gol
+-isysroot @var{dir} @gol
-M -MM -MF -MG -MP -MQ -MT -nostdinc @gol
-P -fworking-directory -remap @gol
-trigraphs -undef -U@var{macro} -Wp,@var{option} @gol
@@ -368,7 +369,8 @@ Objective-C and Objective-C++ Dialects}.
@item Directory Options
@xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir} -specs=@var{file} -I-}
+@gccoptlist{-B@var{prefix} -I@var{dir} -iquote@var{dir} -L@var{dir}
+-specs=@var{file} -I- --sysroot=@var{dir}}
@item Target Options
@c I wrote this xref this way to avoid overfull hbox. -- rms
@@ -6372,6 +6374,22 @@ program uses when determining what switches to pass to @file{cc1},
@option{-specs=@var{file}} can be specified on the command line, and they
are processed in order, from left to right.
+@item --sysroot=@var{dir}
+@opindex sysroot
+Use @var{dir} as the logical root directory for headers and libraries.
+For example, if the compiler would normally search for headers in
+@file{/usr/include} and libraries in @file{/usr/lib}, it will instead
+search @file{@var{dir}/usr/include} and @file{@var{dir}/usr/lib}.
+
+If you use both this option and the @option{-isysroot} option, then
+the @option{--sysroot} option will apply to libraries, but the
+@option{-isysroot} option will apply to header files.
+
+The GNU linker (beginning with version 2.16) has the necessary support
+for this option. If your linker does not support this option, the
+header file aspect of @option{--sysroot} will still work, but the
+library aspect will not.
+
@item -I-
@opindex I-
This option has been deprecated. Please use @option{-iquote} instead for