Re: The cause of the build problems with ccache



On Thu, Jan 19, 2006 at 08:48:27AM +0100, Alexander Leidinger wrote:
> Hi,
>
> I looked at the cause of the build errors when using ccache. When building
> with ccache, the compiler uses /usr/include instead of the includes in
> /usr/src (after the "unsigned char" -> "void" change in the md5 header this
> jumps directly into your face if you look at the error message).
>
> Does the intermediate compiler in /usr/obj get build with a different default
> include path?
>
Yes. The magic is in this line in Makefile.inc1:

XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} -DNO_FORTRAN -DNO_GDB
^^^^^^^^^^^^^^^^^^^^^^^^

> If yes:
> - This would also result in picking up the wrong includes when someone tries
> to build the world with a different compiler (e.g. icc).
>
I believe so.

> - Wouldn't it be better to discard the default include path and add the
> include path we want explicitly on the command line?
>
This was attempted before and failed. I don't remember all the details
now (you can also go ask Marcel and David), but I remember GCC is picky
about standard paths: it would treat them differently from other
locations, resulting in a different set of warnings etc. And we want
it to work exactly as if these paths were standard. The compiler set
uses stuff in ${WORLDTMP}: new headers, libraries, etc.


Cheers,
--
Ruslan Ermilov
ru@xxxxxxxxxxx
FreeBSD committer

Attachment:pgpJcWC7mdz7o.pgp
Description: PGP signature



Relevant Pages