META_MODE: Set HOST_CXX and HOST_CPP and chain them down into CXX/CPP for host builds.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2015-09-30 23:14:23 +00:00
parent 3138cd3670
commit 5c5948ac30
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288432
2 changed files with 13 additions and 6 deletions

View File

@ -28,8 +28,12 @@ CXXFLAGS_LAST+= -I/usr/include
.if ${.MAKE.DEPENDFILE:E} != "host"
UPDATE_DEPENDFILE?= no
.endif
HOST_CC?= /usr/bin/cc
HOST_CC?= /usr/bin/cc
CC= ${HOST_CC}
HOST_CXX?= /usr/bin/c++
CXX= ${HOST_CXX}
HOST_CPP?= /usr/bin/cpp
CPP= ${HOST_CPP}
HOST_CFLAGS+= -DHOSTPROG
CC= ${HOST_CC}
CFLAGS+= ${HOST_CFLAGS}
.endif

View File

@ -213,10 +213,13 @@ TOOLSDIR?= ${STAGE_HOST_OBJTOP}
PATH:= ${PATH:S,:, ,g:@d@${exists(${TOOLSDIR}$d):?${TOOLSDIR}$d:}@:ts:}:${PATH}
.export PATH
.if exists(${TOOLSDIR}/usr/bin/cc)
HOST_CC?= ${TOOLSDIR}/usr/bin/cc
CC?= ${TOOLSDIR}/usr/bin/cc
CXX?= ${TOOLSDIR}/usr/bin/c++
.export HOST_CC CC CXX
HOST_CC?= ${TOOLSDIR}/usr/bin/cc
CC?= ${HOST_CC}
HOST_CXX?= ${TOOLSDIR}/usr/bin/c++
CXX?= ${HOST_CXX}
HOST_CPP?= ${TOOLSDIR}/usr/bin/cpp
CPP?= ${HOST_CPP}
.export HOST_CC CC HOST_CXX CXX HOST_CPP CPP
.endif
.endif
.endif