Subject: Re: x11/xorg-imake won't build with icc
To: grant beattie <grant@NetBSD.org>
From: Emil Skoeldberg <emil.skoldberg@nuigalway.ie>
List: tech-pkg
Date: 07/06/2005 23:17:05
On Tue, Jul 05, 2005 at 07:00:25PM +1000, grant beattie wrote:
> On Mon, Jul 04, 2005 at 01:34:19PM +0100, Emil Skoeldberg wrote:

[cut]
 
> > 2 At the beginning of my attempts to try out pkgsrc on linux with icc,
> >   I just set PKGSRC_COMPILER to icc in mk.conf, and went ahead, I then 
> >   realised that in order to actually use icc I had to set CC to 
> >   path_to/icc (otherwise gcc was used). Again, I would have thought that
> >   setting PKGSRC_COMPILER would have been enough, so have I missed 
> >   anything in my setup of pkgsrc, or is it just the way it is? 
> >   (Why in that case?)
> 
> PKGSRC_COMPILER=icc in mk.conf should be all that is needed. 'cc' and
> 'gcc' wrappers are created so that "dumb" packages still have some
> chance of working.
> 
> are you saying that all builds used gcc, even when PKGSRC_COMPILER=icc
> is set? that seems very wrong...
> 

Indeed, and it was wrong... Setting PKGSRC_COMPILER=icc was exactly
what  was needed. I was confused by the fact that while building
misc/screen, the output of bmake only contained references to gcc,
which I suppose is in order, given that it is a wrapper that calls
icc.

So the question is now the dual of my original question!

Setting PKGSRC_COMPILER to icc, and not having CC or CXX set in the
environment, results in xorg-imake building just fine (using icc...)

But -  setting PKGSRC_COMPILER to icc and having CC and CXX set to the
paths of icc and icpc respectively, causes the build to fail. (See
below).

Which causes the question: couldn't CC and CXX settings be stripped
from the environment, given that everything is wrapped anyway, or
would that cause other breakages?

/emil



make[1]:
Entering directory `/usr/obj/x11/xorg-imake/work/xc/config/imake'
making imake with BOOTSTRAPCFLAGS= and
CROSSCOMPILEFLAGS=-DCROSSCOMPILEDIR="" in config/imake
/opt/intel_cc_80/bin/icc -o ccimake -DCROSSCOMPILEDIR=\"\"  -O
-I../../include -I../../imports/x11/include/X11 ccimake.c
icc: error: could not find directory in which g++ resides
make[1]: *** [ccimake] Error 1
make[1]: Leaving directory
`/usr/obj/x11/xorg-imake/work/xc/config/imake'
make: *** [imake.proto] Err