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:
bdrewery 2018-06-19 23:40:39 +00:00
parent d14e69b8eb
commit 39ee8ca1a1

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