diff options
author | emaste <emaste@FreeBSD.org> | 2015-03-12 08:40:32 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2015-03-12 08:40:32 +0000 |
commit | f6b7187a7ce8c601a58d40dd61c642c582d314d7 (patch) | |
tree | 520cea6e0575d279e1ddfa78a4933b408c0dda8f /Makefile.inc1 | |
parent | 0bed81517c75cb4d4d6b8c5121488881278af6d8 (diff) | |
download | FreeBSD-src-f6b7187a7ce8c601a58d40dd61c642c582d314d7.zip FreeBSD-src-f6b7187a7ce8c601a58d40dd61c642c582d314d7.tar.gz |
Provide automatic cross-binutils path if no BINUTILS_BOOTSTRAP
The in-tree binutils does not support arm64, so will not work for the
forthcoming FreeBSD arm64 port. BROKEN_OPTIONS will include
BINUTILS_BOOTSTRAP, so provide a default CROSS_BINUTILS_PREFIX for this
case.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 8785320..97b5b7b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -318,6 +318,19 @@ LOCALBASE?= /usr/local CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif + +# If we do not have a bootstrap binutils (because the in-tree one does not +# support the target architecture), provide a default cross-binutils prefix. +# This allows aarch64 builds, for example, to automatically use the +# aarch64-binutils port or package. +.if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ + !defined(CROSS_BINUTILS_PREFIX) +CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ +.if !exists(${CROSS_BINUTILS_PREFIX}) +.error In-tree binutils does not support the ${TARGET_ARCH} architecture. Install the ${TARGET_ARCH}-binutils port or package or set CROSS_BINUTILS_PREFIX. +.endif +.endif + XCOMPILERS= CC CXX CPP .for COMPILER in ${XCOMPILERS} .if defined(CROSS_COMPILER_PREFIX) |