OSDN Git Service

* cppdefault.c: Undef NATIVE_SYSTEM_HEADER_DIR if
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Oct 2011 17:55:53 +0000 (17:55 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Oct 2011 17:55:53 +0000 (17:55 +0000)
CROSS_DIRECTORY_STRUCTURE is defined and TARGET_SYSTEM_ROOT is
not.
(cpp_include_defaults): Only use NATIVE_SYSTEM_HEADER_DIR if it is
defined.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180569 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cppdefault.c

index b0b77bc..1672de9 100644 (file)
@@ -1,3 +1,11 @@
+2011-10-27  Ian Lance Taylor  <iant@google.com>
+
+       * cppdefault.c: Undef NATIVE_SYSTEM_HEADER_DIR if
+       CROSS_DIRECTORY_STRUCTURE is defined and TARGET_SYSTEM_ROOT is
+       not.
+       (cpp_include_defaults): Only use NATIVE_SYSTEM_HEADER_DIR if it is
+       defined.
+
 2011-10-27  Richard Henderson  <rth@redhat.com>
 
        * optabs.c (expand_vec_perm): Use the correct mode for scaling the
index fabf314..099899a 100644 (file)
@@ -32,6 +32,7 @@
 
 #if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
 # undef LOCAL_INCLUDE_DIR
+# undef NATIVE_SYSTEM_HEADER_DIR
 #else
 # undef CROSS_INCLUDE_DIR
 #endif
@@ -84,8 +85,10 @@ const struct default_include cpp_include_defaults[]
     /* Another place the target system's headers might be.  */
     { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
 #endif
+#ifdef NATIVE_SYSTEM_HEADER_DIR
     /* /usr/include comes dead last.  */
     { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
+#endif
     { 0, 0, 0, 0, 0, 0 }
   };
 #endif /* no INCLUDE_DEFAULTS */