From owner-svn-src-head@FreeBSD.ORG Mon Aug 18 21:04:45 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 716B39E6; Mon, 18 Aug 2014 21:04:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDA43743; Mon, 18 Aug 2014 21:04:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7IL4jvx094956; Mon, 18 Aug 2014 21:04:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7IL4j9J094954; Mon, 18 Aug 2014 21:04:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408182104.s7IL4j9J094954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 18 Aug 2014 21:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270155 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 21:04:45 -0000 Author: imp Date: Mon Aug 18 21:04:44 2014 New Revision: 270155 URL: http://svnweb.freebsd.org/changeset/base/270155 Log: Create the native-xtools target. This target creates only the cross building toolchain for the host computer. This toolchain produces TARGET_ARCH and assumes the rest of the system contains libraries for the target. It is intended to be used in a "qemu-user jail" where all the binaries would otherwise be the target architecture's to build ports. However, emulation of the compilers is too slow, so we build native binaries for that. Rather than use the xdev produced binaries, with all their weird links and paths, these binaries use the native paths. They will not work unless installed into the qemu-user jail. Differential Revision: https://phabric.freebsd.org/D518 Reviewed by: sbruno@ Modified: head/Makefile head/Makefile.inc1 Modified: head/Makefile ============================================================================== --- head/Makefile Mon Aug 18 21:04:35 2014 (r270154) +++ head/Makefile Mon Aug 18 21:04:44 2014 (r270155) @@ -37,6 +37,8 @@ # xdev-build - Build cross-development tools. # xdev-install - Install cross-development tools. # xdev-links - Create traditional links in /usr/bin for cc, etc +# native-xtools - Create host binaries that produce target objects +# for use in qemu user-mode jails. # # "quick" way to test all kernel builds: # _jflag=`sysctl -n hw.ncpu` @@ -111,7 +113,7 @@ TGTS= all all-man buildenv buildenvvars _worldtmp _legacy _bootstrap-tools _cleanobj _obj \ _build-tools _cross-tools _includes _libraries _depend \ build32 builddtb distribute32 install32 xdev xdev-build xdev-install \ - xdev-links \ + xdev-links native-xtools \ TGTS+= ${SUBDIR_TARGETS} Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Aug 18 21:04:35 2014 (r270154) +++ head/Makefile.inc1 Mon Aug 18 21:04:44 2014 (r270155) @@ -1243,7 +1243,7 @@ _awk= usr.bin/awk _gensnmptree= usr.sbin/bsnmpd/gensnmptree .endif -# We need to build tlbgen when we're building clang either as +# We need to build tblgen when we're building clang either as # the bootstrap compiler, or as the part of the normal build. .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" _clang_tblgen= \ @@ -1418,6 +1418,48 @@ cross-tools: .MAKE ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX} install .endfor +NXBENV= MAKEOBJDIRPREFIX=${OBJTREE}/nxb \ + INSTALL="sh ${.CURDIR}/tools/install.sh" \ + VERSION="${VERSION}" +NXBMAKE= ${NXBENV} ${MAKE} \ + TBLGEN=${OBJTREE}/nxb-bin/usr/bin/tblgen \ + CLANG_TBLGEN=${OBJTREE}/nxb-bin/usr/bin/clang-tblgen \ + MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} \ + MK_GDB=no MK_TESTS=no \ + SSP_CFLAGS= MK_PIE=no \ + MK_HTML=no MK_INFO=no NO_LINT=yes MK_MAN=no \ + -DNO_PIC MK_PROFILE=no -DNO_SHARED \ + -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ + MK_CLANG_FULL=no MK_LLDB=no + +native-xtools: .MAKE + mkdir -p ${OBJTREE}/nxb-bin/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${OBJTREE}/nxb-bin/usr >/dev/null + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + -p ${OBJTREE}/nxb-bin/usr/include >/dev/null +.for _tool in \ + ${_clang_tblgen} \ + usr.bin/ar \ + ${_binutils} \ + ${_cc} \ + ${_gcc_tools} \ + ${_clang_libs} \ + ${_clang} \ + usr.bin/awk \ + usr.bin/bmake \ + usr.bin/lex \ + usr.bin/lorder \ + usr.bin/sed \ + usr.bin/yacc + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool} && \ + ${NXBMAKE} DIRPRFX=${_tool}/ obj && \ + ${NXBMAKE} DIRPRFX=${_tool}/ depend && \ + ${NXBMAKE} DIRPRFX=${_tool}/ all && \ + ${NXBMAKE} DIRPRFX=${_tool}/ DESTDIR=${OBJTREE}/nxb-bin install +.endfor + # # hierarchy - ensure that all the needed directories are present #