Author: emaste
Date: Thu Mar 12 08:40:32 2015
New Revision: 279908
URL: https://svnweb.freebsd.org/changeset/base/279908

Log:
  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

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1  Thu Mar 12 08:32:24 2015        (r279907)
+++ head/Makefile.inc1  Thu Mar 12 08:40:32 2015        (r279908)
@@ -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)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to