tech-pkg archive

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

Re: defaulting to clang on FreeBSD 10.x



rodent%NetBSD.org@localhost writes:

> On Sun, Mar 22, 2015 at 12:33:01PM -0400, Greg Troxel wrote:
>> 
>> I am not quite following this.
>> 
>> Are you saying that if you run bootstrap on FreeBSD 10, you get a
>> $PREFIX/etc/mk.conf that sets PKGSRC_COMPILER to clang, and then
>> everything is ok, but if the user takes that line out, then it tries gcc
>> and fails?
>
> Yes, sir. And it should fail in as few cases as possible, even if the user is
> doing something stupid. That is what i'm proposing to patch.
>
> Based on your previous mail, i would suggest applying a similar patch to the
> Darwin.mk starting with whatever version they stopped shipping gcc in base.

Perhaps it would be better to have an error if the compiler pointed to
by PKGSRC_COMPILER is not found.  I'm generally not a fan of trying to
patch around misconfiguration, as it often seems to lead to more and
more complexity.

Or perhaps on other than NetBSD (where we don't bootstrap and hence an
empty mk.conf is ok), failure to set PKGSRC_COMPILER in mk.conf should
error out immediately with a helpful message.  The bug may be that it's
?= to gcc in the first place.  I can't find that on a quick skim of the
code.

There are also deeper issues in the compiler selection code.   It seems
we can't flip back and forth between clang on gcc (on systems that have
both) because of at least C++ library differences.  But there's code to
force gcc for ada (vs failing).

Attachment: pgp53wNsh4TtD.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index