DragonFly BSD
DragonFly bugs List (threaded) for 2005-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

make nrelease CCVER issues

From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Wed, 31 Aug 2005 04:32:17 +0200


some people already wondered (including me) about why you had to set CCVER=gcc34 manually when building -Devel nrelease isos on -Release.

This is the situation:

release1.2:/usr/src/nrelease % echo $CCVER
CCVER: Undefined variable.
release1.2:/usr/src/nrelease % grep CCVER /etc/make.conf
release1.2:/usr/src/nrelease % make release
. ..
( cd /usr/src/nrelease/..; CCVER=gcc2 make buildworld )
. ..
>>> stage 4a: populating /usr/obj/usr/src/world_i386/usr/include
. ..
===> include/rpcsvc
rpcgen -C -h -DWANT_NFS3 /usr/src/include/rpcsvc/key_prot.x -o key_prot.h
cpp: in path [/usr/obj/usr/src/ctools_i386_i386]/usr/libexec/gcc2/cpp: No such file or directory
*** Error code 1
. ..

So, why does it pass CCVER=gcc2? This is because:

release1.2:/usr/src % grep ^CCVER /usr/share/mk/bsd.cpu.mk
CCVER ?= gcc2

Okay. This is a default setting for building when no CCVER is set. This should be overridden for -Devel builds. It is!

release1.2:/usr/src % tail Makefile

# Build compatibility overrides
. ifdef CCVER
. if ${CCVER} == "gcc2"
CCVER=  gcc34
. endif
. endif

It replaces CCVER=gcc2 with CCVER=gcc34! Still this doesn't work (see above). This is why:

% cat Makefile
FOO?=   gcc2
. makeenv FOO
. if ${FOO} == "gcc2"
FOO=    gcc34
. endif
        @echo FOO=${FOO}, env FOO=$${FOO}
% make
FOO=gcc34, env FOO=gcc34
% make FOO=gcc2
FOO=gcc2, env FOO=gcc2
% env FOO=gcc2 make
FOO=gcc34, env FOO=gcc2

Bug! It sets (internally) FOO to the override "gcc34", but the env FOO doesn't change! And as src/Makefile is just a wrapper which execs
make -f Makefile.inc1, the CCVER=gcc34 override setting doesn't get propagated. Everything else uses CCVER=gcc2 again.

How do we solve this?


Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low $$$ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

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