tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Building NetBSD without gcc
> However, ISTM that if 'make CC=xyzcc' ignores the setting and runs gcc
> it's a bug. Even if nominally other compilers should be integrated
> into the makefile framework, there are times when one wants/needs to
> do 'make CC=../some/other/tooldir/gcc' and that ought to behave as
> advertised.
Well, 'make CC=xyz' works, since command line variables take precedence over
globals. However, I still don't believe that it should be explicitly overridden
when defined globally (e.g. in the Makefile,) or at least I didn't expect this
behavior. Wouldn't conditional setting of the variables (below) make more sense?
--- /usr/share/mk/bsd.own.mk.old 2012-01-09 05:50:42.000000000 -0600
+++ /usr/share/mk/bsd.own.mk 2012-01-09 05:51:16.000000000 -0600
@@ -447,11 +447,11 @@
SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${
!defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} :
}@}
.endfor
# make bugs prevent moving this into the .for loop
-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}}
+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}}
# OBJCOPY flags to create a.out binaries for old firmware
# shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
Home |
Main Index |
Thread Index |
Old Index