diff options
author | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-03-25 22:36:26 +0000 |
---|---|---|
committer | Bryan Drewery <bdrewery@FreeBSD.org> | 2016-03-25 22:36:26 +0000 |
commit | 4e3252c407517c48e6f56bc30a22c82298acd873 (patch) | |
tree | 7f8e8e87b6718e9c8047c5cc588c69698b1ce911 /Makefile.inc1 | |
parent | 5df2c3ccc4cc9ccb0fdb584e38f4943ef9ca6e53 (diff) | |
download | src-4e3252c407517c48e6f56bc30a22c82298acd873.tar.gz src-4e3252c407517c48e6f56bc30a22c82298acd873.zip |
CROSS_BINUTILS_PREFIX: Reduce redundant logic.
Sponsored by: EMC / Isilon Storage Division
Notes
Notes:
svn path=/head/; revision=297279
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 34ba23aa8d66..a01286a448de 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -413,16 +413,16 @@ CROSSENV+= CC="${XCC} ${XCFLAGS}" CXX="${XCXX} ${XCFLAGS} ${XCXXFLAGS}" \ RANLIB=${XRANLIB} STRINGS=${XSTRINGS} \ SIZE="${XSIZE}" -# External compiler needs sysroot and target flags. -.if ${XCC:N${CCACHE_BIN}:M/*} || ${MK_CROSS_COMPILER} == "no" -.if defined(CROSS_BINUTILS_PREFIX) +.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) # 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. -.if exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${CROSS_BINUTILS_PREFIX} .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 .endif .if ${TARGET} == "arm" @@ -447,13 +447,13 @@ TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XCFLAGS+= -target ${TARGET_TRIPLE} .endif -XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} +XCFLAGS+= --sysroot=${WORLDTMP} .else -.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) -BFLAGS+= -B${CROSS_BINUTILS_PREFIX} +.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" + +.if !empty(BFLAGS) XCFLAGS+= ${BFLAGS} .endif -.endif # ${XCC:M/*} || ${MK_CROSS_COMPILER} == "no" .if ${MK_LIB32} != "no" && (${TARGET_ARCH} == "amd64" || \ ${TARGET_ARCH} == "powerpc64") |