diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-25 19:42:04 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-25 19:42:04 +0000 |
commit | a99be1654a402f14905861a44191ec273f38902a (patch) | |
tree | a777a9c833f5e8d7258fa7861d57d97cee80a26f /gcc/gcc.c | |
parent | bc81754c69d60809067492a570d6c95ae2bf4007 (diff) | |
download | gcc-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/gcc.c')
-rw-r--r-- | gcc/gcc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c index a701d2c52f2..c62dbbbe53c 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -1120,6 +1120,7 @@ static const struct option_map option_map[] = {"--static", "-static", 0}, {"--std", "-std=", "aj"}, {"--symbolic", "-symbolic", 0}, + {"--sysroot", "--sysroot=", "aj"}, {"--time", "-time", 0}, {"--trace-includes", "-H", 0}, {"--traditional", "-traditional", 0}, @@ -3064,6 +3065,9 @@ display_help (void) fputs (_(" -time Time the execution of each subprocess\n"), stdout); fputs (_(" -specs=<file> Override built-in specs with the contents of <file>\n"), stdout); fputs (_(" -std=<standard> Assume that the input sources are for <standard>\n"), stdout); + fputs (_("\ + --sysroot=<directory> Use <directory> as the root directory for headers\n\ + for headers and libraries\n"), stdout); fputs (_(" -B <directory> Add <directory> to the compiler's search paths\n"), stdout); fputs (_(" -b <machine> Run gcc for target <machine>, if installed\n"), stdout); fputs (_(" -V <version> Run gcc version number <version>, if installed\n"), stdout); @@ -3926,6 +3930,11 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" ; else if (! strcmp (argv[i], "-fhelp")) ; + else if (! strncmp (argv[i], "--sysroot=", strlen ("--sysroot="))) + { + target_system_root = argv[i] + strlen ("--sysroot="); + target_system_root_changed = 1; + } else if (argv[i][0] == '+' && argv[i][1] == 'e') { /* Compensate for the +e options to the C++ front-end; |