]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
common.opt (--no-sysroot-suffix): New driver option.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 3 Sep 2012 11:34:22 +0000 (12:34 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Mon, 3 Sep 2012 11:34:22 +0000 (12:34 +0100)
* common.opt (--no-sysroot-suffix): New driver option.
* doc/invoke.texi (--no-sysroot-suffix): Document.
* gcc.c (driver_handle_option): Handle --no-sysroot-suffix as not
needing spec processing.
(main): Do not process sysroot suffixes if no_sysroot_suffix.

From-SVN: r190882

gcc/ChangeLog
gcc/common.opt
gcc/doc/invoke.texi
gcc/gcc.c

index 7e188999df7dc4821d5f0a4c6a5398e9554ae6ee..ad59d6348f464ff5876d312d2906e0edee1d6783 100644 (file)
@@ -1,3 +1,11 @@
+2012-09-03  Joseph Myers  <joseph@codesourcery.com>
+
+       * common.opt (--no-sysroot-suffix): New driver option.
+       * doc/invoke.texi (--no-sysroot-suffix): Document.
+       * gcc.c (driver_handle_option): Handle --no-sysroot-suffix as not
+       needing spec processing.
+       (main): Do not process sysroot suffixes if no_sysroot_suffix.
+
 2012-09-02  Oleg Endo  <olegendo@gcc.gnu.org>
 
        PR target/33135
index deb89e32e39300fc26d1854437a0a78cc822c593..87e28b5efe9a0ef369a5ef8ae8a2da685dbdb049 100644 (file)
@@ -291,6 +291,9 @@ Driver Alias(no-canonical-prefixes)
 -no-standard-libraries
 Driver Alias(nostdlib)
 
+-no-sysroot-suffix
+Driver Var(no_sysroot_suffix)
+
 -no-warnings
 Common Alias(w)
 
index 876beaa9c92b9c9f8bab744c71d7e0acec29678f..f8e8a1bad708bc5aa8a044b2e7041a353208bec4 100644 (file)
@@ -457,7 +457,7 @@ Objective-C and Objective-C++ Dialects}.
 @xref{Directory Options,,Options for Directory Search}.
 @gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir} @gol
 -iquote@var{dir} -L@var{dir} -specs=@var{file} -I- @gol
---sysroot=@var{dir}}
+--sysroot=@var{dir} --no-sysroot-suffix}
 
 @item Machine Dependent Options
 @xref{Submodel Options,,Hardware Models and Configurations}.
@@ -9841,6 +9841,15 @@ for this option.  If your linker does not support this option, the
 header file aspect of @option{--sysroot} still works, but the
 library aspect does not.
 
+@item --no-sysroot-suffix
+@opindex no-sysroot-suffix
+For some targets, a suffix is added to the root directory specified
+with @option{--sysroot}, depending on the other options used, so that
+headers may for example be found in
+@file{@var{dir}/@var{suffix}/usr/include} instead of
+@file{@var{dir}/usr/include}.  This option disables the addition of
+such a suffix.
+
 @item -I-
 @opindex I-
 This option has been deprecated.  Please use @option{-iquote} instead for
index 815747eaf0f6167a5e40fcf578157a6a3f2fd490..5f68d5978e3b7c7ff5efa62887f3eaae25c6f9f0 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3249,6 +3249,7 @@ driver_handle_option (struct gcc_options *opts,
       add_linker_option ("--target-help", 13);
       break;
 
+    case OPT__no_sysroot_suffix:
     case OPT_pass_exit_codes:
     case OPT_print_search_dirs:
     case OPT_print_file_name_:
@@ -6340,6 +6341,7 @@ main (int argc, char **argv)
 
   /* Process sysroot_suffix_spec.  */
   if (*sysroot_suffix_spec != 0
+      && !no_sysroot_suffix
       && do_spec_2 (sysroot_suffix_spec) == 0)
     {
       if (VEC_length (const_char_p, argbuf) > 1)
@@ -6363,6 +6365,7 @@ main (int argc, char **argv)
 
   /* Process sysroot_hdrs_suffix_spec.  */
   if (*sysroot_hdrs_suffix_spec != 0
+      && !no_sysroot_suffix
       && do_spec_2 (sysroot_hdrs_suffix_spec) == 0)
     {
       if (VEC_length (const_char_p, argbuf) > 1)