tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Compiler selection support
On Fri, May 27, 2011 at 10:40:04PM +0400, Aleksej Saushev wrote:
> Joerg Sonnenberger <joerg%britannica.bec.de@localhost> writes:
>
> > Comments?
> >
> > Joerg
> > Index: bsd.own.mk
> > ===================================================================
> > RCS file: /home/joerg/repo/netbsd/src/share/mk/bsd.own.mk,v
> > retrieving revision 1.664
> > diff -u -p -r1.664 bsd.own.mk
> > --- bsd.own.mk 9 May 2011 14:36:48 -0000 1.664
> > +++ bsd.own.mk 17 May 2011 19:36:21 -0000
>
> ...
>
> > +# Duplicated to avoid make bugs
> > +CC= ${TOOL_CC.${ACTIVE_CC}}
> > +CPP= ${TOOL_CPP.${ACTIVE_CPP}}
> > +CXX= ${TOOL_CXX.${ACTIVE_CXX}}
> > +FC= ${TOOL_FC.${ACTIVE_FC}}
> > +OBJC= ${TOOL_OBJC.${ACTIVE_OBJC}}
>
> These unconditional settings break the code that exists outside NetBSD src.
> Note that sys.mk does it right:
>
> CC?= cc
> CXX?= c++
>
> It allows overriding compiler in Makefile in a canonical manner (before
> including bsd.*.mk).
I did consider making the assignment in sys.mk use another level of
indirection, but rejected it as not useful. The logic as is allows
compiler selection consistently for both the USETOOLS=no and
USETOOLS=yes case. I consider that an important feature.
Joerg
Home |
Main Index |
Thread Index |
Old Index