From 160633c62690e70e5af6bad15c3e0ccab8b59578 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 25 Jul 2005 19:42:04 +0000 Subject: gcc.c (option_map): Add --sysroot. * 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. From-SVN: r102367 --- gcc/gcc.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/gcc.c') diff --git a/gcc/gcc.c b/gcc/gcc.c index a701d2c..c62dbbb 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= Override built-in specs with the contents of \n"), stdout); fputs (_(" -std= Assume that the input sources are for \n"), stdout); + fputs (_("\ + --sysroot= Use as the root directory for headers\n\ + for headers and libraries\n"), stdout); fputs (_(" -B Add to the compiler's search paths\n"), stdout); fputs (_(" -b Run gcc for target , if installed\n"), stdout); fputs (_(" -V Run gcc version number , 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; -- cgit v1.1