Look for cross toolchain makefiles in /usr/share/toolchains.

The freebsd-binutils and freebsd-gcc* packages install toolchain
makefiles to /usr/share/toolchains rather than LOCALBASE.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D22985
This commit is contained in:
John Baldwin 2020-01-02 21:34:44 +00:00
parent 0aabbeff36
commit 39eb07f172

View File

@ -62,6 +62,8 @@ LOCALBASE?= /usr/local
.if defined(CROSS_TOOLCHAIN)
.if exists(${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk)
.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk"
.elif exists(/usr/share/toolchains/${CROSS_TOOLCHAIN}.mk)
.include "/usr/share/toolchains/${CROSS_TOOLCHAIN}.mk"
.elif exists(${CROSS_TOOLCHAIN})
.include "${CROSS_TOOLCHAIN}"
.else