PDA

View Full Version : changing the gcc standard include search path



RoshanX
12-31-2006, 08:35 PM
Hi all,

Is there a way to change where GCC will look for glibc header files ( defult: /usr/include , /usr/local/include ...) ? is there a way to change the spec file and archive this ?
( I want to do this without using ENV variables and/or -I switch ).

Thank you!

Salem
01-01-2007, 09:23 AM
`-nostdinc'
Do not search the standard system directories for header files.
Only the directories you have specified with `-I' options (and the
directory of the current file, if appropriate) are searched.

> ( I want to do this without using ENV variables and/or -I switch ).
Short of rebuilding your compiler, I don't think you can.

The switch above allows you to turn off all the standard paths, so you can specify your own. If it worries you that much, write a shell script wrapper around gcc.