aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-07-25 19:42:04 +0000
committerMark Mitchell <mark@codesourcery.com>2005-07-25 19:42:04 +0000
commit441c5e6ae36bb2dea06924e7bf19297b1a1c3dd2 (patch)
treea777a9c833f5e8d7258fa7861d57d97cee80a26f /gcc/gcc.c
parent3ee77c79ec264cc724f9c76e82c98b6d2c15c8cc (diff)
* 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: https://gcc.gnu.org/svn/gcc/trunk@102367 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c9
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;