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
On Sun, Mar 22, 2015 at 01:07:51PM -0400, Greg Troxel wrote:
>
> 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.
I think the way it works now is correct. "Oh, you want that compiler? Don't
have it? Let me build it for you." What you're proposing involves more work
for the user and seems to be more complex. The misconfiguration is in our
framework which assumes a compiler exists on a system where it does not.
> 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.
That's more work for the user still. The framework can be smart to know that
gcc is part of NetBSD already, so why not default to if it not set elsewhere?
Ideally, there would be as few options as possible that the user would need to
set and maintain in mk.conf (note i'm considering bootstrap as a user, too).
> 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).
It's sort of outside the scope of this discussion, because i want to address
this on systems which don't have gcc by default. That point is interesting and
valid though and we'd need to solve it at some point.
Home |
Main Index |
Thread Index |
Old Index