Date: Thu, 9 Oct 2014 09:04:01 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272811 - head Message-ID: <201410090904.s99941FS058334@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410090904.s99941FS058334>