diff options
author | imp <imp@FreeBSD.org> | 2014-08-18 21:04:44 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-08-18 21:04:44 +0000 |
commit | 1ddbac150a36f8a3148c117d46df96840dc6beab (patch) | |
tree | 55e6b7dce96f2980c34e56daf78a1ad534d069e6 /Makefile.inc1 | |
parent | f7f2052abfff8798a3cfc9c3c103540dd5554645 (diff) | |
download | FreeBSD-src-1ddbac150a36f8a3148c117d46df96840dc6beab.zip FreeBSD-src-1ddbac150a36f8a3148c117d46df96840dc6beab.tar.gz |
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@
Diffstat (limited to 'Makefile.inc1')
-rw-r--r-- | Makefile.inc1 | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 4acc089..0e2f655 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -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 # |