[PATCH] make include path handling gcc compatible
commit99efcabf79a1d6c5c48fa29abc8a895009b4aa72
authorSam Ravnborg <sam@ravnborg.org>
Tue, 18 Jan 2005 23:15:25 +0000 (18 16:15 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 8 Apr 2005 04:06:15 +0000 (7 21:06 -0700)
tree0350282f9f05435c3c7417bb63090a205be4e571
parent423e91dbdcd2ee723ea8955ace6cf8749525f21a
[PATCH] make include path handling gcc compatible

Search include paths in same order as gcc does.

In other words search directories specified with -I before system
directories.

This fixes a bug reported by a few persons after the kernel switched
over to use -isystem to specify where to find compiler specific include files.

Sparse now supports the following include path relevant options:
-I dir Add dir to list of directories to search for. Search dir
before system dirs. Used for both <> and "" includes.
-I- Split include path - previous -I dir paths only used for
include "".
Also disable searching same dir as input file.
-isystem dir Add dir first in row of system dirs to search.
-dirafter dir Add dir in end of system dirs to search.
-nostdinc Discard all defined system dirs

The -iwithprefix, -iprefix and -iwithprefixbefore options are not not
supported and silently ignored. gcc discourage use of these options.
lib.c
pre-process.c
token.h
tokenize.c