CROSS_BINUTILS_PREFIX: Reduce redundant logic.

Sponsored by:	EMC / Isilon Storage Division
This commit is contained in:
Bryan Drewery 2016-03-25 22:36:26 +00:00
parent 5df2c3ccc4
commit 4e3252c407

View File

@ -413,16 +413,16 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \
RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \
SIZE="${XSIZE}" SIZE="${XSIZE}"
# External compiler needs sysroot and target flags. .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX})
.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no"
.if defined(CROSS_BINUTILS_PREFIX)
# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a # In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
# directory, but the compiler will look in the right place for it's # directory, but the compiler will look in the right place for its
# tools so we don't need to tell it where to look. # tools so we don't need to tell it where to look.
.if exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${CROSS_BINUTILS_PREFIX} BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif .endif
.else
# External compiler needs sysroot and target flags.
.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no"
.if !defined(CROSS_BINUTILS_PREFIX) || !exists(${CROSS_BINUTILS_PREFIX})
BFLAGS+= -B${WORLDTMP}/usr/bin BFLAGS+= -B${WORLDTMP}/usr/bin
.endif .endif
.if ${TARGET} == "arm" .if ${TARGET} == "arm"
@ -447,13 +447,13 @@ TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XCFLAGS+= -target ${TARGET_TRIPLE} XCFLAGS+= -target ${TARGET_TRIPLE}
.endif .endif
XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} XCFLAGS+= --sysroot=${WORLDTMP}
.else .else
.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) .endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no"
BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.if !empty(BFLAGS)
XCFLAGS+= ${BFLAGS} XCFLAGS+= ${BFLAGS}
.endif .endif
.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no"
.if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \
${TARGET_ARCH} == "powerpc64") ${TARGET_ARCH} == "powerpc64")