Turns out GCC 3.x support -isystem also, they just don't document it.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 19 Jul 2005 03:59:52 +0000 (03:59 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 19 Jul 2005 03:59:52 +0000 (03:59 +0000)
Use -isystem unconditionally instead of trying to detect support for it.

src/Make.config
src/Makefile.build
src/Makefile.userprog

index f9822b66d468f3198b504056f538bbb8b09b08bb..5cee541eb41dc780ec2936bfccee07ae4dcaf177 100644 (file)
@@ -18,21 +18,11 @@ LD = i386-elf-ld
 OBJCOPY = i386-elf-objcopy
 endif
 
-# GCC 3.3 specifies directories for #include <> as "-I- -Idir"
-# GCC 4.x specifies directories for #include <> as "-isystem dir"
-# Figure out which format to use.
-ifeq (0, $(shell $(CC) -v 2>&1 | grep 'gcc version 4' >/dev/null 2>&1; echo $$?))
-SYSINCFLAGS = $(patsubst %,-isystem %,$(SYSINCDIRS))
-else
-SYSINCFLAGS = -I- $(patsubst %,-I%,$(SYSINCDIRS))
-endif
-
 # Compiler and assembler invocation.
 DEFINES =
 WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wsystem-headers
 CFLAGS = -g -MMD -msoft-float -masm=intel
-SYSINCDIRS = $(SRCDIR)/lib
-CPPFLAGS = -nostdinc -I$(SRCDIR) $(SYSINCFLAGS)
+CPPFLAGS = -nostdinc -I$(SRCDIR) -isystem $(SRCDIR)/lib
 ASFLAGS = -Wa,--gstabs -MMD
 LDFLAGS = 
 
index 2e1d6e93a255ba52a2d2f4efb4ce1cd79bf2335a..d6e5b4b2ab929b165524efe3e4811c310816b026 100644 (file)
@@ -9,7 +9,7 @@ include ../Make.vars
 include ../../tests/Make.tests
 
 # Compiler and assembler options.
-os.dsk: SYSINCDIRS += $(SRCDIR)/lib/kernel
+os.dsk: CPPFLAGS += -isystem $(SRCDIR)/lib/kernel
 
 # Core kernel.
 threads_SRC  = threads/init.c          # Main program.
index dddb1aa4b62f5ca1257dd95130dc95e6c86bcb7f..36cdcda4fa735a7c3818f714597db750b97f3bff 100644 (file)
@@ -2,7 +2,7 @@
 
 include $(SRCDIR)/Make.config
 
-$(PROGS): SYSINCDIRS += $(SRCDIR)/lib/user
+$(PROGS): CPPFLAGS += -isystem $(SRCDIR)/lib/user
 
 # Linker flags.
 $(PROGS): LDFLAGS = -nostdlib -static -Wl,-T,$(LDSCRIPT)