This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

the gcc "private" include dir


Excuse my terminology if it's incorrect. I'd like to understand what controls/tells a particular gcc executable whether to search its "private" include dir and if so where that is. What I mean by "private include dir" is a directory named "include" that appears to be solely for, and installed as part of, gcc, and is also gcc-release specific. For example, it contains header files such as "stdarg.h" which (at least on my system) are not found anywhere else. (This file, amongst other things, defines the typedef "va_list" to be a compiler built-in)

On my RedHat system, which came with gcc-2.96 and on which I've subsequently installed newer gcc's such as 3.3.3 and 3.4.0, I see these private include dirs:

/usr/lib/gcc-lib/i386-redhat-linux/2.96/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3/include
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/include
/usr/local/lib/gcc-lib/glibc2/3.3/include
/usr/local/lib/gcc-lib/glibc2/3.3.1/include
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include

After the most recentl install, of 3.4.0, which works perfectly, I needed to run the original 2.96 compiler. I still had the 2.96 gcc executable and it ran ok but the compilation failed with
include/linux/kernel.h:10:20: stdarg.h: No such file or directory
It appears as though the 2.96 gcc has "forgotten" where its private include dir is. When compiling the same file with 3.4.0, it finds its stdarg.h, but I need it compiled with 2.96.


Can anyone explain how this all works and what is the correct procedure for switching from one release to another previously installed one.

John

_________________________________________________________________
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]