diff --git a/Makefile.cross b/Makefile.cross index 7d68bd16c0c..8c7641503db 100644 --- a/Makefile.cross +++ b/Makefile.cross @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.cross,v 1.96 2017/08/11 19:36:37 drahn Exp $ +# $OpenBSD: Makefile.cross,v 1.97 2017/09/12 08:16:13 mpi Exp $ cross-tools: cross-includes cross-binutils cross-gcc cross-lib cross-distrib: cross-tools cross-bin cross-share cross-sys cross-etc-root-var @@ -83,10 +83,16 @@ CROSSGCC= ${CROSSDIR}/.gcc_done .if !empty(CLANG_ARCH:M${_arch}) COMPILER_VERSION=clang BUILD_CLANG=yes +CC=clang +CXX=clang++ .elif !empty(GCC3_ARCH:M${_arch}) COMPILER_VERSION=gcc3 +CC=gcc +CXX=g++ .else COMPILER_VERSION=gcc4 +CC=gcc +CXX=g++ .endif .if !empty(PIE_ARCH:M${_arch}) @@ -190,6 +196,7 @@ ${CROSSBINUTILS}: ${CROSSINCLUDES} PATH=${CROSSPATH} \ ${MAKE} -f Makefile.bsd-wrapper depend && \ env CROSSDIR=${CROSSDIR} \ + CC=${CC} CXX=${CXX} \ MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ PIE_DEFAULT=${PIE_DEFAULT} \ TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \ @@ -228,7 +235,7 @@ ${CROSSGCC}: ${CROSSBINUTILS} MACHINE_ARCH=${TARGET_ARCH} \ ${MAKE} obj) (cd ${.CURDIR}/gnu/usr.bin/clang; \ - CC=clang CXX=clang++ \ + CC=${CC} CXX=${CXX} \ MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ MACHINE_ARCH=${TARGET_ARCH} \ ${MAKE} all) @@ -258,6 +265,7 @@ ${CROSSGCC}: ${CROSSBINUTILS} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \ CROSSDIR=${CROSSDIR} \ + CC=${CC} CXX=${CXX} \ ${MAKE} -f Makefile.bsd-wrapper all && \ env CROSSDIR=${CROSSDIR} DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ PATH=${CROSSPATH} ${MAKE} -f Makefile.bsd-wrapper install) @@ -286,6 +294,8 @@ ${CROSSGCC}: ${CROSSBINUTILS} PATH=${CROSSPATH} ${MAKE} depend ) (cd ${.CURDIR}/gnu/usr.bin/cc; \ env CROSSDIR=${CROSSDIR} \ + COMPILER_VERSION=${COMPILER_VERSION} \ + CC=${CC} CXX=${CXX} \ PIE_DEFAULT=${PIE_DEFAULT} \ MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \ @@ -293,6 +303,7 @@ ${CROSSGCC}: ${CROSSBINUTILS} ${MAKE} all ) (cd ${.CURDIR}/gnu/usr.bin/cc; \ env CROSSDIR=${CROSSDIR} DESTDIR=${CROSSDIR} \ + COMPILER_VERSION=${COMPILER_VERSION} \ PIE_DEFAULT=${PIE_DEFAULT} \ MAKEOBJDIR=obj.${MACHINE}.${TARGET} \ TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \