Let CROSS_BINUTILS_PREFIX work without a trailing slash.

Reported by:	jhb
MFC after:	2 weeks
Sponsored by:	Dell EMC
This commit is contained in:
Bryan Drewery 2018-06-19 23:40:39 +00:00
parent 8a854b3683
commit 4d64cb780b

View File

@ -211,8 +211,8 @@ CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/
XBINUTILS= AS AR LD NM OBJCOPY RANLIB SIZE STRINGS
.for BINUTIL in ${XBINUTILS}
.if defined(CROSS_BINUTILS_PREFIX) && \
exists(${CROSS_BINUTILS_PREFIX}${${BINUTIL}})
X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}}
exists(${CROSS_BINUTILS_PREFIX}/${${BINUTIL}})
X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX:C,/*$,,}/${${BINUTIL}}
.else
X${BINUTIL}?= ${${BINUTIL}}
.endif