Re: toolchain target

From: Simon J. Gerraty <sjg_at_juniper.net>
Date: Thu, 18 Jun 2015 10:40:07 -0700
Andriy Gapon <avg_at_FreeBSD.org> wrote:
> > do you have anything interesting in /etc/make.conf?
> 
> Thank you for the hint -- __MAKE_CONF=/dev/null SRC_CONF=/dev/null fix the problem.
> 
> Now I am trying to figure out what the problem is.

The problem will be that I shifted the include of make.conf and etc
to earlier in sys.mk so that they can provide pointer to external
toolchains.

> 
> My make.conf:
> .if defined(CC)
> .if ${CC} == gcc

which will break all this - see the UPDATING entry.

> CPUTYPE?=k8-sse3
> .else
> CPUTYPE?=amdfam10
> .endif
> .endif
> CFLAGS+= -O2 -fno-strict-aliasing -pipe
> CFLAGS+= -fno-omit-frame-pointer
> CXXFLAGS+= -O2 -fno-strict-aliasing -pipe

The root problem is that a global file like /etc/make.conf is a very
fragile concept - makes it almost impossible to evolve the the build.
Especially if you put anything in there more complex that setting global
knobs.

Any use of += etc, makes it sentitive to the point of inclusion.

It is useful to include local.sys.mk (hence src.sys.mk) very early.
So that they can do CC?= blah etc. before sys.mk does

But the current semantic is that make.conf should be included first
which means it needs to be included early .. which breaks everyone who
has "interesting" stuff there.

> And src.conf:
> WITH_DEBUG_FILES=yes
> WITH_CTF=yes

What is perhaps really needed is yet another include that can happen
early and another later during sys.mk processing
We could then move include of make.conf back 

Will investigate...
Received on Thu Jun 18 2015 - 16:13:09 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:58 UTC