Enable and utilize WITHOUT_CROSS_COMPILER logic for external CC.

This is a NOP.

Reviewed by:	brooks, bapt
Sponsored by:	EMC / Isilon Storage Division
Differential Revision:	https://reviews.freebsd.org/D6354
This commit is contained in:
Bryan Drewery 2016-05-21 01:32:07 +00:00
parent 34fb4407a8
commit c1b9d0022d

View File

@ -91,6 +91,12 @@ X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}}
X${BINUTIL}?= ${${BINUTIL}} X${BINUTIL}?= ${${BINUTIL}}
.endif .endif
.endfor .endfor
# If a full path to an external cross compiler is given, don't build
# a cross compiler.
.if ${XCC:N${CCACHE_BIN}:M/*}
MK_CROSS_COMPILER= no
.endif
.include <bsd.compiler.mk> # don't depend on src.opts.mk doing it .include <bsd.compiler.mk> # don't depend on src.opts.mk doing it
.include "share/mk/src.opts.mk" .include "share/mk/src.opts.mk"
@ -454,7 +460,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif .endif
# External compiler needs sysroot and target flags. # External compiler needs sysroot and target flags.
.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" .if ${MK_CROSS_COMPILER} == "no"
.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX}) .if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${WORLDTMP}/usr/bin BFLAGS+= -B${WORLDTMP}/usr/bin
.endif .endif
@ -478,7 +484,7 @@ XCFLAGS+= -target ${TARGET_TRIPLE}
.endif .endif
XCFLAGS+= --sysroot=${WORLDTMP} XCFLAGS+= --sysroot=${WORLDTMP}
.else .else
.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" .endif # ${MK_CROSS_COMPILER} == "no"
.if !empty(BFLAGS) .if !empty(BFLAGS)
XCFLAGS+= ${BFLAGS} XCFLAGS+= ${BFLAGS}
@ -1714,9 +1720,7 @@ _elftctools= lib/libelftc \
usr.bin/elfcopy usr.bin/elfcopy
.endif .endif
# If an full path to an external cross compiler is given, don't build .if ${MK_CROSS_COMPILER} != "no"
# a cross compiler.
.if ${XCC:N${CCACHE_BIN}:M/*} == "" && ${MK_CROSS_COMPILER} != "no"
.if ${MK_CLANG_BOOTSTRAP} != "no" .if ${MK_CLANG_BOOTSTRAP} != "no"
_clang= usr.bin/clang _clang= usr.bin/clang
_clang_libs= lib/clang _clang_libs= lib/clang