From 3c9a2b55615908e38b39e6232de0985094cb4bc6 Mon Sep 17 00:00:00 2001
From: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Date: Mon, 24 Apr 2000 20:12:12 +0000
Subject: [PATCH] Makefile.in (GCC_FOR_TARGET, [...]): Use -isystem, not -I,
 for including system headers.

        * Makefile.in (GCC_FOR_TARGET, GCC_CFLAGS, LIBGCC2_INCLUDES,
        deduced.h): Use -isystem, not -I, for including system headers.

From-SVN: r33388
---
 gcc/ChangeLog   |  5 +++++
 gcc/Makefile.in | 10 +++++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a8443a85be1d..9fdf5048fac8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-04-24  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+	* Makefile.in (GCC_FOR_TARGET, GCC_CFLAGS, LIBGCC2_INCLUDES,
+	deduced.h): Use -isystem, not -I, for including system headers.
+
 2000-04-24  Nick Clifton  <nickc@cygnus.com>
 
 	* config/fr30/fr30.md (addsi3): Do not use small add instruction if
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 887ee8993752..50856b8d955c 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -161,12 +161,12 @@ INSTALL_ASSERT_H = install-assert-h
 # The GCC to use for compiling libgcc2.a, enquire, and libgcc1-test.
 # Usually the one we just built.
 # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
-GCC_FOR_TARGET = ./xgcc -B$(build_tooldir)/bin/ -B./ -I$(build_tooldir)/include
+GCC_FOR_TARGET = ./xgcc -B$(build_tooldir)/bin/ -B./ -isystem $(build_tooldir)/include
 
 # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
 # It omits XCFLAGS, and specifies -B./.
-# It also specifies -I./include to find, e.g., stddef.h.
-GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -I./include $(TCFLAGS)
+# It also specifies -isystem ./include to find, e.g., stddef.h.
+GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) -isystem ./include $(TCFLAGS)
 
 # Specify the abi to use when building the c++ runtime
 GXX_ABI_FLAG=@GXX_ABI_FLAG@
@@ -360,7 +360,7 @@ LIBGCC2_DEBUG_CFLAGS = -g1
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED @inhibit_libc@
 
 # Additional options to use when compiling libgcc2.a.
-# Some targets override this to -Iinclude
+# Some targets override this to -isystem include
 LIBGCC2_INCLUDES =
 
 # Additional target-dependent options for compiling libgcc2.a.
@@ -2239,7 +2239,7 @@ stmp-fixinc: fixinc.sh gsyslimits.h
 deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
 	if [ -d $(SYSTEM_HEADER_DIR) ]; \
 	then \
-	  CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR}"; \
+	  CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -I. -I$(srcdir) -isystem include -isystem ${SYSTEM_HEADER_DIR}"; \
 	  export CC; \
 	  $(SHELL) $(srcdir)/scan-types.sh "$(srcdir)" >tmp-deduced.h; \
 	  mv tmp-deduced.h deduced.h; \
-- 
GitLab