tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Bootstrapping on OS X with clang



> The problem was that I still had an old revision of mk/compilers/clang.mk 
> which insisted on building clang from pkgsrc.
> 
>> -    CC="gcc -isystem /usr/include"; export CC
> I prefer CC=${CC:-"gcc -isystem /usr/include"}; export CC.

Well, I don't see any point in setting CC there. I had to remove the line to 
bootsrap pkgsrc on PowerMac G5 with GCC-4.2.1.


>> After successful bootstrap, add PKGSRC_COMPILER=clang to your mk.conf.
> That's already automatically included by bootstrap.
> 
> Now I'm not sure how it's supposed to work, but despite having set 
> PKGSRC_COMPILER to clang, I still have to say CC=clang bmake package or 
> otherwise gcc will be used to build packages.

You'll see "cc", but "clang" will be called by a wrapper. You can see it in 
work/.wrapper/bin/cc:
cmd="/usr/pkg/bin/clang"
And, sometimes, you'll notice colourful clang warnings. ;)

Cheers,
Adam


Home | Main Index | Thread Index | Old Index