Author: bapt
Date: Thu Oct 9 09:04:01 2014
New Revision: 272811
URL: https://svnweb.freebsd.org/changeset/base/272811
Log:
Add CROSS_TOOLCHAIN macro select pre seeded external toolchain configuration
files
The goal is to provide pre seeded toolchain configurations withing the ports
tree
to allow the use of an external toolchain in a simple way:
make CROSS_TOOLCHAIN=powerpc64-gcc TARGET=powerpc TARGET_ARCH=powerpc64
buildworld
This will look for the external toolchain definition in
/usr/local/share/mk/powerpc64-gcc.mk
While here add the notion of X_COMPILER_TYPE to the external toolchain
framework to allow
to deal with differences between gcc and clang in regards of cross building
Modified:
head/Makefile.inc1
Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1 Thu Oct 9 07:52:51 2014 (r272810)
+++ head/Makefile.inc1 Thu Oct 9 09:04:01 2014 (r272811)
@@ -299,6 +299,10 @@ HMAKE+= PATH=${TMPPATH} METALOG=${METAL
WMAKEENV+= MK_CTF=no
.endif
+.if defined(CROSS_TOOLCHAIN)
+LOCALBASE?= /usr/local
+.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk"
+.endif
.if defined(CROSS_TOOLCHAIN_PREFIX)
CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}
CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX}
@@ -343,10 +347,14 @@ TARGET_ABI= gnueabihf
TARGET_ABI= gnueabi
.endif
.endif
+.if ${X_COMPILER_TYPE} == gcc
+XFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib
+.else
TARGET_ABI?= unknown
TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0
XFLAGS+= -target ${TARGET_TRIPLE}
.endif
+.endif
WMAKE= ${WMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1
DESTDIR=${WORLDTMP}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"