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 04:53:52PM +0100, Tobias Nygren wrote:
> On Sun, 22 Mar 2015 11:41:49 -0400
> rodent%NetBSD.org@localhost wrote:
>
> > On Sun, Mar 22, 2015 at 11:32:43AM -0400, Greg Troxel wrote:
> > >
> > > rodent%NetBSD.org@localhost writes:
> > >
> > > > This is pretty easy to reproduce. However you've bootstrapped pkgsrc on
> > > > FreeBSD 10.x, whether with a mk-fragment or not, you can comment the
> > > > PKGSRC_COMPILER, CC, CXX, CPP, and CLANGBASE variables in mk.conf and pkgsrc
> > > > will want to build gcc-3 on that system to build any other packages.
> > >
> > > So there is something wrong.
> > >
> > > > Attached is a patch which fixes this behaviour for FreeBSD >= 10. OK to commit
> > > > during the freeze?
> > >
> > > I agree with Joerg; I don't understand why the change is in FreeBSD.mk.
> > > After reading your diff, I went to look at Darwin.mk, because OSX had
> > > the change of clang being added and gcc removed before FreeBSD, and I
> > > *think* that bootstrap on mac autodetects clang and it all works ok.
> > >
> > > In bootstrap.mk, see "get_compiler", which is trying to run gcc/cc and
> > > determine whether it is clang or gcc. It seems that should decide on
> > > clang, which should cause the generated mk.conf to have clang.
> > >
> > > I ran a fresh bootstrap (OS X 10.9, which has clang and does not have
> > > gcc) and the generated mk.conf had:
> > >
> > > PKGSRC_COMPILER= clang
> > > CC= clang
> > > CXX= clang++
> > > CPP= ${CC} -E
> > > CLANGBASE= /usr
> >
> > Forget we're talking about bootstrap. Forget mk.conf exists. The deal is that
> > if clang isn't set, pkgsrc will attempt to build gcc3-c to build any package
> > on FreeBSD 10.x. That's what this patch fixes.
> >
> > Now, an easy way to prove this is bootstrapping on FreeBSD. Yes, those
> > variables will be set in mk.conf. Comment them. See pkgsrc want to build
> > gcc3-c to build more packages.
>
> But why would you remove the settings that bootstrap has determined to
> be required? This is how it has always worked and is not limited
> to FreeBSD nor PKGSRC_COMPILER. For example all the TOOLS_PLATFORM
> variables that bootstrap may conditionally set in mk.conf if it detects
> that it has to install compatibility packages.
To add to this: It has been a long standing issues that most of the
TOOLS_PLATFORM.* stuff should not be hard-coded at all, but set by
bootstrap. One of the big reasons it is not done is because certain
people always insist that NetBSD must be handled specially without
bootstrap. The other big reason is noone has sit down to do it.
Stop adding any more complexity to the platform specific files. It is a
step into the wrong direction.
Joerg
Home |
Main Index |
Thread Index |
Old Index