include paths and gcc-3.0.4
David Caldwell
david@indigita.com
Tue Apr 2 17:23:00 GMT 2002
Hello all,
First off: gcc version 3.0.4, newlib version 1.10.0.
I'm having a bunch of problems with include paths. I'm trying to make a
cross-compiler for arm-elf (for an embedded project). The problem is that
I'm using newlib, but gcc keeps insisting on making the default include
path "/usr/include" which is clearly wrong as newlib doesn't even install
its include stuff there. Newlib's includes get put into
/usr/local/arm-elf/include. So to get my stuff to compile at the moment I
have to pass "-I- -I /usr/local/arm-elf/include" to gcc which is really
gross (not to mention non-portable).
I have tried configuring with the following options (in various
combinations with various different values) and I have had no luck in
getting gcc to find the headers.
--prefix=/usr/local
--with-gxx-include-dir=/usr/local/arm-elf/include/g++-v3
--includedir=/usr/local/arm-elf/include
--with-headers=/$(gcc_source)/gcc/gincludes
CROSS_INCLUDE_DIR looks promising but I can't figure out how to cleanly set
it. It defaults to /usr/local/arm-elf/sys-include which is not where newlib
goes.
So, three questions:
* How do I get gcc to search the correct place by default?
* Can I put the "-I" junk in the specs file?
* Why doesn't this just work by default?
Thanks,
David
More information about the Gcc-help
mailing list