001c68bd94
program/tool from "FOO" to "TOOL_FOO". The new variables are: TOOL_ASN1_COMPILE TOOL_CAP_MKDB TOOL_CAT TOOL_CKSUM TOOL_COMPILE_ET TOOL_CONFIG TOOL_CRUNCHGEN TOOL_CTAGS TOOL_DB TOOL_EQN TOOL_FGEN TOOL_GENCAT TOOL_GROFF TOOL_HEXDUMP TOOL_INDXBIB TOOL_INSTALLBOOT TOOL_INSTALL_INFO TOOL_M4 TOOL_MAKEFS TOOL_MAKEINFO TOOL_MAKEWHATIS TOOL_MDSETIMAGE TOOL_MENUC TOOL_MKCSMAPPER TOOL_MKESDB TOOL_MKLOCALE TOOL_MKMAGIC TOOL_MKTEMP TOOL_MSGC TOOL_MTREE TOOL_PAX TOOL_PIC TOOL_PREPMKBOOTIMAGE TOOL_PWD_MKDB TOOL_REFER TOOL_ROFF_ASCII TOOL_ROFF_DVI TOOL_ROFF_HTML TOOL_ROFF_PS TOOL_ROFF_RAW TOOL_RPCGEN TOOL_SOELIM TOOL_SUNLABEL TOOL_TBL TOOL_UUDECODE TOOL_VGRIND TOOL_ZIC For each, provide default in <bsd.sys.mk> of the form: TOOL_FOO?= foo and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override: TOOL_FOO= ${TOOLDIR}/bin/${_TOOL_PREFIX}foo Document all of these in bsd.README. This cleans up a chunk of potential (and actual) namespace collision within our build infrastructure, as well as improves consistency in the share/mk documentation and provision of appropriate defaults for each of these variables. |
||
---|---|---|
.. | ||
Makefile | ||
mknative | ||
README.mknative |
$NetBSD: README.mknative,v 1.4 2003/03/01 13:09:09 mrg Exp $ This file describes how to bootstrap the native toolchain on a new NetBSD platform (and how to update the new toolchain files, if needed). These files may be generated on a cross-compile host without problems. NOTE: DO NOT RUN "mknative" BY HAND! It requires the Makefile in this directory to set up certain environments first. Since libc's features change over time, the config.h files can change as a result; thus the instructions below are the same no matter whether bootstrapping on a cross or native host. This is important: even on a "native" host, you should bootstrap the toolchain by building from an up-to-date source tree to a $DESTDIR using the exact same instructions. In these notes, MACHINE is the $MACHINE of the target. These files can be cross-generated. Though a $MACHINE_ARCH all uses the same config files, you must pick a specific $MACHINE so that building the requisite bits below will work. 1. Set MKMAINTAINERTOOLS=yes in mk.conf. (Needed so that src/tools/gettext gets built, eliciting proper HAVE_*GETTEXT* defns in config.h files.) 2. Build and install a cross toolchain (via "build.sh -m MACHINE tools"). 3. In src/tools/toolchain, do "nbmake-MACHINE bootstrap-libgcc". This will create just enough glue in src/gnu/lib/libgcc to make it possible to build, based on the toolchain built in ${.OBJDIR}/build. Because the files generated in this step contain things like -DCROSS_COMPILE, they are not suitable for committing. Step 7 below will regenerate the "proper" libgcc config files. 4. At top level, do "nbmake-MACHINE do-distrib-dirs obj includes MKGCC=no MKBFD=no". 5. In src/gnu/lib/libgcc, do "nbmake-MACHINE obj includes". 6. In each of src/gnu/lib/libgcc and src/lib, do "nbmake-MACHINE all install". Optionally, all of the following may be set in the environment to reduce the amount of code needed to build at this step. Basically, it must be possible for static binaries to build and base system libs to exist so that "configure" can do its job for the target--these MK* options omit the rest for this stage of the build. MKCRYPTO=no MKLINT=no MKPIC=no MKPROFILE=no MKSHARE=no 7. In src/tools/toolchain, do "nbmake-MACHINE native". This will do a full configury in ${.OBJDIR}/.native that is a "Canadian" cross toolchain (--build reflects the host platform, but --host and --target are the target). The result is a tree that would build a native-to-NetBSD compiler on a cross host, and mknative pulls glue data from this. 8. Try out a full build using "nbmake-MACHINE"; the result should include a native compiler. 9. If all is well, commit the glue files added to src/gnu/{lib,usr.bin}/*. - tv@netbsd.org