diff --git a/BUILDING b/BUILDING index 6310da12e87e..c1b3861e479d 100644 --- a/BUILDING +++ b/BUILDING @@ -93,93 +93,92 @@ CONFIGURATION Environment variables Several environment variables control the behaviour of NetBSD builds. - HOST_CC Path name to C compiler used to create the toolchain. + HOST_CC Path name to C compiler used to create the toolchain. - HOST_CFLAGS Flags passed to the host C compiler. + HOST_CFLAGS Flags passed to the host C compiler. - HOST_CXX Path name to C++ compiler used to create the toolchain. + HOST_CXX Path name to C++ compiler used to create the toolchain. - HOST_CXXFLAGS Flags passed to the host C++ compiler. + HOST_CXXFLAGS Flags passed to the host C++ compiler. - HOST_SH Path name to a shell available on the host system and - suitable for use during the build. The NetBSD build - system requires a modern Bourne-like shell with POSIX- - compliant features, and also requires support for the - "local" keyword to declare local variables in shell - functions (which is a widely-implemented but non- - standardised feature). + HOST_SH Path name to a shell available on the host system and + suitable for use during the build. The NetBSD build + system requires a modern Bourne-like shell with POSIX- + compliant features, and also requires support for the + "local" keyword to declare local variables in shell + functions (which is a widely-implemented but non- + standardised feature). - Depending on the host system, a suitable shell may be - /bin/sh, /usr/xpg4/bin/sh, /bin/ksh (provided it is a - variant of ksh that supports the "local" keyword, such - as ksh88, but not ksh93), or /usr/local/bin/bash. + Depending on the host system, a suitable shell may be + /bin/sh, /usr/xpg4/bin/sh, /bin/ksh (provided it is a + variant of ksh that supports the "local" keyword, such as + ksh88, but not ksh93), or /usr/local/bin/bash. - Most parts of the build require HOST_SH to be an - absolute path; however, build.sh allows it to be a - simple command name, which will be converted to an - absolute path by searching the PATH. + Most parts of the build require HOST_SH to be an absolute + path; however, build.sh allows it to be a simple command + name, which will be converted to an absolute path by + searching the PATH. INSTALLBOOT_UBOOT_PATHS - A colon-separated list of search paths used by - installboot(8) to find U-Boot packages. + A colon-separated list of search paths used by + installboot(8) to find U-Boot packages. - MACHINE Machine type, e.g., "macppc". + MACHINE Machine type, e.g., "macppc". - MACHINE_ARCH Machine architecture, e.g., "powerpc". + MACHINE_ARCH Machine architecture, e.g., "powerpc". - MAKE Path name to invoke make(1) as. + MAKE Path name to invoke make(1) as. - MAKECONF The name of the make(1) configuration file. See "make" - variables and mk.conf(5). + MAKECONF The name of the make(1) configuration file. See "make" + variables and mk.conf(5). - Note: Only settable in the process environment. + Note: Only settable in the process environment. - Default: "/etc/mk.conf" + Default: "/etc/mk.conf" - MAKEFLAGS Flags to invoke make(1) with. + MAKEFLAGS Flags to invoke make(1) with. - Note: build.sh ignores the value of MAKEFLAGS passed in - the environment, but allows MAKEFLAGS to be set via the - -V option. + Note: build.sh ignores the value of MAKEFLAGS passed in + the environment, but allows MAKEFLAGS to be set via the + -V option. - MAKEOBJDIR Directory to use as the .OBJDIR for the current - directory. The value is subjected to variable expansion - by make(1). Typical usage is to set this variable to a - value involving the use of `${.CURDIR:S...}' or - `${.CURDIR:C...}', to derive the value of .OBJDIR from - the value of .CURDIR. Used only if MAKEOBJDIRPREFIX is - not defined. + MAKEOBJDIR Directory to use as the .OBJDIR for the current + directory. The value is subjected to variable expansion + by make(1). Typical usage is to set this variable to a + value involving the use of `${.CURDIR:S...}' or + `${.CURDIR:C...}', to derive the value of .OBJDIR from + the value of .CURDIR. Used only if MAKEOBJDIRPREFIX is + not defined. - Note: MAKEOBJDIR can be provided only in the environment - or via the -O flag of build.sh; it cannot usefully be - set inside a Makefile, including in mk.conf(5) or - MAKECONF. + Note: MAKEOBJDIR can be provided only in the environment + or via the -O flag of build.sh; it cannot usefully be set + inside a Makefile, including in mk.conf(5) or MAKECONF. MAKEOBJDIRPREFIX - Top level directory of the object directory tree. The - value is subjected to variable expansion by make(1). - build.sh will create the ${MAKEOBJDIRPREFIX} directory - if necessary, but if make(1) is used without build.sh, - then rules in will abort the build if the - ${MAKEOBJDIRPREFIX} directory does not exist. If the - value is defined and valid, then - ${MAKEOBJDIRPREFIX}/${.CURDIR} is used as the .OBJDIR - for the current directory. The current directory may be - read only. + Top level directory of the object directory tree. The + value is subjected to variable expansion by make(1). + build.sh will create the ${MAKEOBJDIRPREFIX} directory if + necessary, but if make(1) is used without build.sh, then + rules in will abort the build if the + ${MAKEOBJDIRPREFIX} directory does not exist. If the + value is defined and valid, then + ${MAKEOBJDIRPREFIX}/${.CURDIR} is used as the .OBJDIR for + the current directory. The current directory may be read + only. - Note: MAKEOBJDIRPREFIX can be provided only in the - environment or via the -M flag of build.sh; it cannot - usefully be set inside a Makefile, including in - mk.conf(5) or MAKECONF. + Note: MAKEOBJDIRPREFIX can be provided only in the + environment or via the -M flag of build.sh; it cannot + usefully be set inside a Makefile, including in + mk.conf(5) or MAKECONF. - TMPDIR Top-level directory to store temporary directories used - by build.sh before paths to other directories such as - .OBJDIR can be determined. + TMPDIR Top-level directory to store temporary directories used + by build.sh before paths to other directories such as + .OBJDIR can be determined. - Note: Must support execution of binaries. I.e., without - mount(8)'s -o noexec option. + Note: Must support execution of binaries. I.e., without + mount(8)'s -o noexec option. - Default: "/tmp". + Default: "/tmp". "make" variables Several variables control the behavior of NetBSD builds. Unless @@ -190,533 +189,533 @@ CONFIGURATION This list is not comprehensive; all supported variables and their defaults are documented in mk.conf(5). - BSDOBJDIR The real path to the object directory tree for the - NetBSD source tree. + BSDOBJDIR The real path to the object directory tree for the NetBSD + source tree. - Default: "/usr/obj" + Default: "/usr/obj" - BSDSRCDIR The real path to the NetBSD source tree, if NETBSDSRCDIR - isn't defined. + BSDSRCDIR The real path to the NetBSD source tree, if NETBSDSRCDIR + isn't defined. - Default: "/usr/src" + Default: "/usr/src" - BUILDID Identifier for the build. If set, this should be a - short string that is suitable for use as part of a file - or directory name. The identifier will be appended to - object directory names, and can be consulted in the - make(1) configuration file in order to set additional - build parameters, such as compiler flags. It will also - be used as part of the kernel version string, which can - be shown by "uname -v". + BUILDID Identifier for the build. If set, this should be a short + string that is suitable for use as part of a file or + directory name. The identifier will be appended to + object directory names, and can be consulted in the + make(1) configuration file in order to set additional + build parameters, such as compiler flags. It will also + be used as part of the kernel version string, which can + be shown by "uname -v". - Default: Unset. + Default: Unset. - BUILDINFO Optional multi-line string containing information about - the build. This will appear in DESTDIR/etc/release, and - it will be stored in the buildinfo variable in any - kernels that are built. When such kernels are booted, - the sysctl(7) kern.buildinfo variable will report this - value. The string may contain backslash escape - sequences, such as "\\" (representing a backslash - character) and "\n" (representing a newline). + BUILDINFO Optional multi-line string containing information about + the build. This will appear in DESTDIR/etc/release, and + it will be stored in the buildinfo variable in any + kernels that are built. When such kernels are booted, + the sysctl(7) kern.buildinfo variable will report this + value. The string may contain backslash escape + sequences, such as "\\" (representing a backslash + character) and "\n" (representing a newline). - Default: Unset. + Default: Unset. - BUILDSEED g++(1) uses random numbers when compiling C++ code. - This variable seeds the g++(1) random number generator - using -frandom-seed with this value. By default, it is - set to "NetBSD-(majorversion)". Using a fixed value - causes C++ binaries to be the same when built from the - same sources, resulting in identical (reproducible) - builds. Additional information is available in the - g++(1) documentation of -frandom-seed. + BUILDSEED g++(1) uses random numbers when compiling C++ code. This + variable seeds the g++(1) random number generator using + -frandom-seed with this value. By default, it is set to + "NetBSD-(majorversion)". Using a fixed value causes C++ + binaries to be the same when built from the same sources, + resulting in identical (reproducible) builds. Additional + information is available in the g++(1) documentation of + -frandom-seed. - Default: Unset. + Default: Unset. - CPUFLAGS Additional flags to the compiler/assembler to select CPU - instruction set options, CPU tuning options, etc. + CPUFLAGS Additional flags to the compiler/assembler to select CPU + instruction set options, CPU tuning options, etc. - Default: Unset. + Default: Unset. - DESTDIR Directory to contain the built NetBSD system. If set, - special options are passed to the compilation tools to - prevent their default use of the host system's - /usr/include, /usr/lib, and so forth. This pathname - must be an absolute path, and should not end with a - slash (/) character. (For installation into the - system's root directory, set DESTDIR to an empty string, - not to "/"). The directory must reside on a file system - which supports long file names and hard links. + DESTDIR Directory to contain the built NetBSD system. If set, + special options are passed to the compilation tools to + prevent their default use of the host system's + /usr/include, /usr/lib, and so forth. This pathname must + be an absolute path, and should not end with a slash (/) + character. (For installation into the system's root + directory, set DESTDIR to an empty string, not to "/"). + The directory must reside on a file system which supports + long file names and hard links. - Note: build.sh will provide a default of destdir.MACHINE - (in the top-level .OBJDIR) unless run in `expert' mode. + Note: build.sh will provide a default of destdir.MACHINE + (in the top-level .OBJDIR) unless run in `expert' mode. - Default: Empty string if USETOOLS is "yes"; unset - otherwise. + Default: Empty string if USETOOLS is "yes"; unset + otherwise. EXTERNAL_TOOLCHAIN - If defined, this variable indicates the root directory - of an external toolchain which will be used to build the - tree. For example, if a platform is a TOOLCHAIN_MISSING - platform, EXTERNAL_TOOLCHAIN can be used to re-enable - the cross-compile framework. + If defined, this variable indicates the root directory of + an external toolchain which will be used to build the + tree. For example, if a platform is a TOOLCHAIN_MISSING + platform, EXTERNAL_TOOLCHAIN can be used to re-enable the + cross-compile framework. - If EXTERNAL_TOOLCHAIN is defined, act as MKGCC=no, since - the external version of the compiler may not be able to - build the library components of the in-tree compiler. + If EXTERNAL_TOOLCHAIN is defined, act as MKGCC=no, since + the external version of the compiler may not be able to + build the library components of the in-tree compiler. - This variable should be used in conjunction with an - appropriate HAVE_GCC or HAVE_LLVM setting to control the - compiler flags. + This variable should be used in conjunction with an + appropriate HAVE_GCC or HAVE_LLVM setting to control the + compiler flags. - Note: This variable is not yet used in as many places as - it should be. Expect the exact semantics of this - variable to change in the short term as parts of the - cross-compile framework continue to be cleaned up. + Note: This variable is not yet used in as many places as + it should be. Expect the exact semantics of this + variable to change in the short term as parts of the + cross-compile framework continue to be cleaned up. - Default: Unset. + Default: Unset. - MAKEVERBOSE Level of verbosity of status messages. Supported - values: + MAKEVERBOSE Level of verbosity of status messages. Supported values: - 0 No descriptive messages or commands executed by - make(1) are shown. + 0 No descriptive messages or commands executed by + make(1) are shown. - 1 Brief messages are shown describing what is being - done, but the actual commands executed by make(1) - are not shown. + 1 Brief messages are shown describing what is being + done, but the actual commands executed by make(1) are + not shown. - 2 Descriptive messages are shown as above (prefixed - with a `#'), and ordinary commands performed by - make(1) are shown. + 2 Descriptive messages are shown as above (prefixed + with a `#'), and ordinary commands performed by + make(1) are shown. - 3 In addition to the above, all commands performed by - make(1) are shown, even if they would ordinarily - have been hidden through use of the "@" prefix in - the relevant makefile. + 3 In addition to the above, all commands performed by + make(1) are shown, even if they would ordinarily have + been hidden through use of the "@" prefix in the + relevant makefile. - 4 In addition to the above, commands executed by - make(1) are traced through use of the sh(1) "-x" - flag. + 4 In addition to the above, commands executed by + make(1) are traced through use of the sh(1) "-x" + flag. - Default: 2 + Default: 2 - MKCATPAGES Can be set to "yes" or "no". Indicates whether - preformatted plaintext manual pages will be created and - installed. + MKCATPAGES Can be set to "yes" or "no". Indicates whether + preformatted plaintext manual pages will be created and + installed. - Forced to "no" if MKMAN=no or MKSHARE=no. + Forced to "no" if MKMAN=no or MKSHARE=no. - Default: "no" + Default: "no" - MKCROSSGDB Can be set to "yes" or "no". Create a cross-gdb as a - host tool. + MKCROSSGDB Can be set to "yes" or "no". Create a cross-gdb as a + host tool. - Default: "no" + Default: "no" - MKDEBUG Can be set to "yes" or "no". Indicates whether debug - information should be generated for all userland - binaries. The result is collected as an additional - debug.tgz and xdebug.tgz set and installed in - DESTDIR/usr/libdata/debug. + MKDEBUG Can be set to "yes" or "no". Indicates whether debug + information should be generated for all userland + binaries. The result is collected as an additional + debug.tgz and xdebug.tgz set and installed in + DESTDIR/usr/libdata/debug. - Forced to "no" if NODEBUG is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NODEBUG is defined, usually in the + Makefile before any make(1) .include directives. - Default: "no" + Default: "no" - MKDEBUGKERNEL Can be set to "yes" or "no". Indicates whether - debugging symbols will be built for kernels by default; - pretend as if makeoptions DEBUG="-g" is specified in - kernel configuration files. This will also put the - debug kernel netbsd.gdb in the kernel sets. See - options(4) for details. This is useful if a cross-gdb - is built as well (see MKCROSSGDB). + MKDEBUGKERNEL Can be set to "yes" or "no". Indicates whether debugging + symbols will be built for kernels by default; pretend as + if makeoptions DEBUG="-g" is specified in kernel + configuration files. This will also put the debug kernel + netbsd.gdb in the kernel sets. See options(4) for + details. This is useful if a cross-gdb is built as well + (see MKCROSSGDB). - Default: "no" + Default: "no" - MKDEBUGLIB Can be set to "yes" or "no". Indicates whether debug - libraries (lib*_g.a) will be built and installed. Debug - libraries are compiled with "-g -DDEBUG". + MKDEBUGLIB Can be set to "yes" or "no". Indicates whether debug + libraries (lib*_g.a) will be built and installed. Debug + libraries are compiled with "-g -DDEBUG". - Forced to "no" if NODEBUGLIB is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NODEBUGLIB is defined, usually in the + Makefile before any make(1) .include directives. - Default: "no" + Default: "no" - MKDEBUGTOOLS Can be set to "yes" or "no". Indicates whether debug - information (lib*_g.a) will be included in the build - toolchain. + MKDEBUGTOOLS Can be set to "yes" or "no". Indicates whether debug + information (lib*_g.a) will be included in the build + toolchain. - Default: "no" + Default: "no" - MKDOC Can be set to "yes" or "no". Indicates whether system - documentation destined for DESTDIR/usr/share/doc will be - installed. + MKDOC Can be set to "yes" or "no". Indicates whether system + documentation destined for DESTDIR/usr/share/doc will be + installed. - Forced to "no" if NODOC is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NODOC is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKSHARE=no. + Forced to "no" if MKSHARE=no. - Default: "yes" + Default: "yes" - MKHOSTOBJ Can be set to "yes" or "no". If set to "yes", then for - programs intended to be run on the compile host, the - name, release, and architecture of the host operating - system will be suffixed to the name of the object - directory created by "make obj". (This allows multiple - host systems to compile NetBSD for a single target.) If - set to "no", then programs built to be run on the - compile host will use the same object directory names as - programs built to be run on the target. + MKHOSTOBJ Can be set to "yes" or "no". If set to "yes", then for + programs intended to be run on the compile host, the + name, release, and architecture of the host operating + system will be suffixed to the name of the object + directory created by "make obj". (This allows multiple + host systems to compile NetBSD for a single target.) If + set to "no", then programs built to be run on the compile + host will use the same object directory names as programs + built to be run on the target. - Default: "no" + Default: "no" - MKHTML Can be set to "yes" or "no". Indicates whether the HTML - manual pages are created and installed. and installed + MKHTML Can be set to "yes" or "no". Indicates whether the HTML + manual pages are created and installed. and installed - Forced to "no" if NOHTML is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOHTML is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKMAN=no or MKSHARE=no. + Forced to "no" if MKMAN=no or MKSHARE=no. - Default: "yes" + Default: "yes" - MKINFO Can be set to "yes" or "no". Indicates whether GNU Info - files, used for the documentation for most of the - compilation tools, will be built and installed. + MKINFO Can be set to "yes" or "no". Indicates whether GNU Info + files, used for the documentation for most of the + compilation tools, will be built and installed. - Forced to "no" if NOINFO is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOINFO is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKSHARE=no. + Forced to "no" if MKSHARE=no. - Default: "yes" + Default: "yes" - MKKDEBUG Deprecated, use MKDEBUGKERNEL. + MKKDEBUG Deprecated, use MKDEBUGKERNEL. - MKKMOD Can be set to "yes" or "no". Indicates whether kernel - modules are built and installed. + MKKMOD Can be set to "yes" or "no". Indicates whether kernel + modules are built and installed. - Default: "no" on or1k; "yes" on other platforms. + Default: "no" on or1k; "yes" on other platforms. - MKLINKLIB Can be set to "yes" or "no". Indicates whether all of - the shared library infrastructure will be built and - installed. If "no", prevents: installation of the *.a - libraries, installation of the *_pic.a libraries on PIC - systems, building of *.a libraries on PIC systems, or - installation of .so symlinks on ELF systems. + MKLINKLIB Can be set to "yes" or "no". Indicates whether all of + the shared library infrastructure will be built and + installed. If "no", prevents: installation of the *.a + libraries, installation of the *_pic.a libraries on PIC + systems, building of *.a libraries on PIC systems, or + installation of .so symlinks on ELF systems. - Forced to "no" if NOLINKLIB is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOLINKLIB is defined, usually in the + Makefile before any make(1) .include directives. - If "no", acts as MKLINT=no MKPICINSTALL=no MKPROFILE=no. + If "no", acts as MKLINT=no MKPICINSTALL=no MKPROFILE=no. - Default: "yes" + Default: "yes" - MKLINT Can be set to "yes" or "no". Indicates whether lint(1) - will be run against portions of the NetBSD source code - during the build, and whether lint libraries will be - installed into DESTDIR/usr/libdata/lint. + MKLINT Can be set to "yes" or "no". Indicates whether lint(1) + will be run against portions of the NetBSD source code + during the build, and whether lint libraries will be + installed into DESTDIR/usr/libdata/lint. - Forced to "no" if NOLINT is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOLINT is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKLINKLIB=no. + Forced to "no" if MKLINKLIB=no. - Default: "no" + Default: "no" - MKMAN Can be set to "yes" or "no". Indicates whether manual - pages will be installed. + MKMAN Can be set to "yes" or "no". Indicates whether manual + pages will be installed. - Forced to "no" if NOMAN is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOMAN is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKSHARE=no. + Forced to "no" if MKSHARE=no. - If "no", acts as MKCATPAGES=no MKHTML=no. + If "no", acts as MKCATPAGES=no MKHTML=no. - Default: "yes" + Default: "yes" - MKNLS Can be set to "yes" or "no". Indicates whether Native - Language System (NLS) locale zone files will be built - and installed. + MKNLS Can be set to "yes" or "no". Indicates whether Native + Language System (NLS) locale zone files will be built and + installed. - Forced to "no" if NONLS is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NONLS is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKSHARE=no. + Forced to "no" if MKSHARE=no. - Default: "yes" + Default: "yes" - MKOBJ Can be set to "yes" or "no". Indicates whether object - directories will be created when running "make obj". If - set to "no", then all built files will be located inside - the regular source tree. + MKOBJ Can be set to "yes" or "no". Indicates whether object + directories will be created when running "make obj". If + set to "no", then all built files will be located inside + the regular source tree. - Forced to "no" if NOOBJ is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOOBJ is defined, usually in the + Makefile before any make(1) .include directives. - If "no", acts as MKOBJDIRS=no. + If "no", acts as MKOBJDIRS=no. - Note: Setting MKOBJ to "no" is not recommended and may - cause problems when updating the tree with cvs(1). + Note: Setting MKOBJ to "no" is not recommended and may + cause problems when updating the tree with cvs(1). - Default: "yes" + Default: "yes" - MKOBJDIRS Can be set to "yes" or "no". Indicates whether object - directories will be created automatically (via a "make - obj" pass) at the start of a build. + MKOBJDIRS Can be set to "yes" or "no". Indicates whether object + directories will be created automatically (via a "make + obj" pass) at the start of a build. - Forced to "no" if MKOBJ=no. + Forced to "no" if MKOBJ=no. - Default: "no" + Default: "no" - MKPIC Can be set to "yes" or "no". Indicates whether shared - objects and libraries will be created and installed. If - "no", the entire built system will be statically linked. + MKPIC Can be set to "yes" or "no". Indicates whether shared + objects and libraries will be created and installed. If + "no", the entire built system will be statically linked. - Forced to "no" if NOPIC is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOPIC is defined, usually in the + Makefile before any make(1) .include directives. - If "no", acts as MKPICLIB=no. + If "no", acts as MKPICLIB=no. - Default: "no" on m68000; "yes" on other platforms. + Default: "no" on m68000; "yes" on other platforms. - MKPICINSTALL Can be set to "yes" or "no". Indicates whether the - ar(1) format libraries (lib*_pic.a), used to generate - shared libraries, are installed. + MKPICINSTALL Can be set to "yes" or "no". Indicates whether the ar(1) + format libraries (lib*_pic.a), used to generate shared + libraries, are installed. - Forced to "no" if NOPICINSTALL is defined, usually in - the Makefile before any make(1) .include directives. + Forced to "no" if NOPICINSTALL is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKLINKLIB=no. + Forced to "no" if MKLINKLIB=no. - Default: "no" + Default: "no" - MKPROFILE Can be set to "yes" or "no". Indicates whether profiled - libraries (lib*_p.a) will be built and installed. + MKPROFILE Can be set to "yes" or "no". Indicates whether profiled + libraries (lib*_p.a) will be built and installed. - Forced to "no" if NOPROFILE is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOPROFILE is defined, usually in the + Makefile before any make(1) .include directives. - Forced to "no" if MKLINKLIB=no. + Forced to "no" if MKLINKLIB=no. - Default: "no" on or1k, riscv32, and riscv64 (due to - toolchain problems with profiled code); "yes" on other - platforms. + Default: "no" on or1k, riscv32, and riscv64 (due to + toolchain problems with profiled code); "yes" on other + platforms. - MKREPRO Can be set to "yes" or "no". Indicates whether builds - are to be reproducible. If "yes", two builds from the - same source tree will produce the same build results. + MKREPRO Can be set to "yes" or "no". Indicates whether builds + are to be reproducible. If "yes", two builds from the + same source tree will produce the same build results. - Used as the default for MKARZERO. + Used as the default for MKARZERO. - This may be set to "yes" by giving build.sh the -P - option. + This may be set to "yes" by giving build.sh the -P + option. - Default: "no" Can be set to "yes" or "no". + Default: "no" Can be set to "yes" or "no". MKREPRO_TIMESTAMP - Unix timestamp. When MKREPRO is set, the timestamp of - all files in the sets will be set to this value. + Unix timestamp. When MKREPRO is set, the timestamp of + all files in the sets will be set to this value. - This may be set automatically to the latest source tree - timestamp using cvslatest(1) by giving build.sh the -P - option. + This may be set automatically to the latest source tree + timestamp using cvslatest(1) by giving build.sh the -P + option. - Default: Unset. + Default: Unset. - MKSHARE Can be set to "yes" or "no". Indicates whether files - destined to reside in DESTDIR/usr/share will be built - and installed. + MKSHARE Can be set to "yes" or "no". Indicates whether files + destined to reside in DESTDIR/usr/share will be built and + installed. - Forced to "no" if NOSHARE is defined, usually in the - Makefile before any make(1) .include directives. + Forced to "no" if NOSHARE is defined, usually in the + Makefile before any make(1) .include directives. - If "no", acts as MKCATPAGES=no MKDOC=no MKINFO=no - MKHTML=no MKMAN=no MKNLS=no. + If "no", acts as MKCATPAGES=no MKDOC=no MKINFO=no + MKHTML=no MKMAN=no MKNLS=no. - Default: "yes" + Default: "yes" - MKSTRIPIDENT Can be set to "yes" or "no". Indicates whether RCS IDs, - for use with ident(1), should be stripped from program - binaries and shared libraries. + MKSTRIPIDENT Can be set to "yes" or "no". Indicates whether RCS IDs, + for use with ident(1), should be stripped from program + binaries and shared libraries. - Default: "no" + Default: "no" - MKSTRIPSYM Can be set to "yes" or "no". Indicates whether all - local symbols should be stripped from shared libraries. - If "yes", strip all local symbols from shared libraries; - the affect is equivalent to the -x option of ld(1). If - "no", strip only temporary local symbols; the affect is - equivalent to the -X option of ld(1). Keeping non- - temporary local symbols such as static function names is - useful on using DTrace for userland libraries and - getting a backtrace from a rump kernel loading shared - libraries. + MKSTRIPSYM Can be set to "yes" or "no". Indicates whether all local + symbols should be stripped from shared libraries. If + "yes", strip all local symbols from shared libraries; the + affect is equivalent to the -x option of ld(1). If "no", + strip only temporary local symbols; the affect is + equivalent to the -X option of ld(1). Keeping non- + temporary local symbols such as static function names is + useful on using DTrace for userland libraries and getting + a backtrace from a rump kernel loading shared libraries. - Default: "yes" + Default: "yes" - MKUNPRIVED Can be set to "yes" or "no". Indicates whether an - unprivileged install will occur. The user, group, - permissions, and file flags, will not be set on the - installed items; instead the information will be - appended to a file called METALOG in DESTDIR. The - contents of METALOG are used during the generation of - the distribution tar files to ensure that the - appropriate file ownership is stored. + MKUNPRIVED Can be set to "yes" or "no". Indicates whether an + unprivileged install will occur. The user, group, + permissions, and file flags, will not be set on the + installed items; instead the information will be appended + to a file called METALOG in DESTDIR. The contents of + METALOG are used during the generation of the + distribution tar files to ensure that the appropriate + file ownership is stored. - Default: "no" + Default: "no" - MKUPDATE Can be set to "yes" or "no". Indicates whether all - install operations intended to write to DESTDIR will - compare file timestamps before installing, and skip the - install phase if the destination files are up-to-date. + MKUPDATE Can be set to "yes" or "no". Indicates whether all + install operations intended to write to DESTDIR will + compare file timestamps before installing, and skip the + install phase if the destination files are up-to-date. - Note: This also has implications on full builds (see - next subsection). + Note: This also has implications on full builds (see next + subsection). - Default: "no" + Default: "no" - MKX11 Can be set to "yes" or "no". Indicates whether X11 is - built and installed from X11SRCDIR. + MKX11 Can be set to "yes" or "no". Indicates whether X11 is + built and installed from X11SRCDIR, and whether the X + sets will be created. - Default: "no" + Note: If "yes", requires MKINET6=yes. - NETBSDSRCDIR The path to the top level of the NetBSD sources. + Default: "no" - Default: Top level of the NetBSD source tree (as - determined by the presence of build.sh and tools/) if - make(1) is run from within that tree; otherwise - BSDSRCDIR will be used. + NETBSDSRCDIR The path to the top level of the NetBSD sources. + + Default: Top level of the NetBSD source tree (as + determined by the presence of build.sh and tools/) if + make(1) is run from within that tree; otherwise BSDSRCDIR + will be used. TOOLCHAIN_MISSING - Can be set to "yes" or "no". If not "no", this - indicates that the platform "MACHINE_ARCH" being built - does not have a working in-tree toolchain. + Can be set to "yes" or "no". If not "no", this indicates + that the platform "MACHINE_ARCH" being built does not + have a working in-tree toolchain. - If not "no", acts as MKBINUTILS=no MKGCC=no MKGDB=no. + If not "no", acts as MKBINUTILS=no MKGCC=no MKGDB=no. - Default: "no" + Default: "no" - TOOLDIR Directory to hold the host tools, once built. If - specified, must be an absolute path. This directory - should be unique to a given host system and NetBSD - source tree. (However, multiple targets may share the - same TOOLDIR; the target-dependent files have unique - names.) If unset, a default based on the uname(1) - information of the host platform will be created in the - .OBJDIR of src. + TOOLDIR Directory to hold the host tools, once built. If + specified, must be an absolute path. This directory + should be unique to a given host system and NetBSD source + tree. (However, multiple targets may share the same + TOOLDIR; the target-dependent files have unique names.) + If unset, a default based on the uname(1) information of + the host platform will be created in the .OBJDIR of src. - Default: Unset. + Default: Unset. - USETOOLS Can be set to "yes" or "no". Indicates whether the - tools specified by TOOLDIR should be used as part of a - build in progress. Must be set to "yes" if cross- - compiling. + USETOOLS Can be set to "yes" or "no". Indicates whether the tools + specified by TOOLDIR should be used as part of a build in + progress. Must be set to "yes" if cross-compiling. - yes Use the tools from TOOLDIR. + yes Use the tools from TOOLDIR. - no Do not use the tools from TOOLDIR, but refuse to - build native compilation tool components that are - version-specific for that tool. + no Do not use the tools from TOOLDIR, but refuse to + build native compilation tool components that are + version-specific for that tool. - never Do not use the tools from TOOLDIR, even when - building native tool components. This is similar - to the traditional NetBSD build method, but does - not verify that the compilation tools in use are - up-to-date enough in order to build the tree - successfully. This may cause build or runtime - problems when building the whole NetBSD source - tree. + never Do not use the tools from TOOLDIR, even when + building native tool components. This is similar + to the traditional NetBSD build method, but does + not verify that the compilation tools in use are + up-to-date enough in order to build the tree + successfully. This may cause build or runtime + problems when building the whole NetBSD source + tree. - Default: "no" when using outside the NetBSD - source tree (detected automatically) or if - TOOLCHAIN_MISSING=yes; "yes" otherwise. + Default: "no" when using outside the NetBSD + source tree (detected automatically) or if + TOOLCHAIN_MISSING=yes; "yes" otherwise. - X11SRCDIR Directory containing the modular Xorg source. If - specified, must be an absolute path. The main modular - Xorg source is found in X11SRCDIR/external/mit. + X11SRCDIR Directory containing the modular Xorg source. If + specified, must be an absolute path. The main modular + Xorg source is found in X11SRCDIR/external/mit. - Default: NETBSDSRCDIR/../xsrc, if that exists; otherwise - /usr/xsrc. + Default: NETBSDSRCDIR/../xsrc, if that exists; otherwise + /usr/xsrc. "make" variables for full builds These variables only affect the top level "Makefile" and do not affect manually building subtrees of the NetBSD source code. INSTALLBOOT_BOARDS - A list of boards to create bootable images for. If - corresponding U-Boot packages are installed, bootable - images are created as part of a release. See the - -o board=name option of installboot(8). + A list of boards to create bootable images for. If + corresponding U-Boot packages are installed, bootable + images are created as part of a release. See the + -o board=name option of installboot(8). - INSTALLWORLDDIR Location for the "make installworld" target to install - to. If specified, must be an absolute path. + INSTALLWORLDDIR + Location for the "make installworld" target to install + to. If specified, must be an absolute path. - Default: "/" + Default: "/" - MKOBJDIRS Can be set to "yes" or "no". Indicates whether object - directories will be created automatically (via a "make - obj" pass) at the start of a build. + MKOBJDIRS Can be set to "yes" or "no". Indicates whether object + directories will be created automatically (via a "make + obj" pass) at the start of a build. - Default: "no" + Default: "no" - If using build.sh, the default is "yes". This may be - set back to "no" by giving build.sh the -o option. + If using build.sh, the default is "yes". This may be set + back to "no" by giving build.sh the -o option. - MKUPDATE Can be set to "yes" or "no". If set, then in addition - to the effects described for MKUPDATE=yes above, this - implies the effects of NOCLEANDIR (i.e., "make cleandir" - is avoided). + MKUPDATE Can be set to "yes" or "no". If set, then in addition to + the effects described for MKUPDATE=yes above, this + implies the effects of NOCLEANDIR (i.e., "make cleandir" + is avoided). - Default: "no" + Default: "no" - If using build.sh, this may be set by giving the -u - option. + If using build.sh, this may be set by giving the -u + option. - NBUILDJOBS Now obsolete. Use the make(1) option -j, instead. See - below. + NBUILDJOBS Now obsolete. Use the make(1) option -j, instead. See + below. - Default: Unset. + Default: Unset. - NOCLEANDIR If set, avoids the "make cleandir" phase of a full - build. This has the effect of allowing only changed - files in a source tree to be recompiled. This can speed - up builds when updating only a few files in the tree. + NOCLEANDIR If set, avoids the "make cleandir" phase of a full build. + This has the effect of allowing only changed files in a + source tree to be recompiled. This can speed up builds + when updating only a few files in the tree. - Default: Unset. + Default: Unset. - See also MKUPDATE. + See also MKUPDATE. - NODISTRIBDIRS If set, avoids the "make distrib-dirs" phase of a full - build. This skips running mtree(8) on DESTDIR, useful - on systems where building as an unprivileged user, or - where it is known that the system-wide mtree files have - not changed. + NODISTRIBDIRS If set, avoids the "make distrib-dirs" phase of a full + build. This skips running mtree(8) on DESTDIR, useful on + systems where building as an unprivileged user, or where + it is known that the system-wide mtree files have not + changed. - Default: Unset. + Default: Unset. - NOINCLUDES If set, avoids the "make includes" phase of a full - build. This has the effect of preventing make(1) from - thinking that some programs are out-of-date simply - because the system include files have changed. However, - this option should not be used when updating the entire - NetBSD source tree arbitrarily; it is suggested to use - MKUPDATE=yes instead in that case. + NOINCLUDES If set, avoids the "make includes" phase of a full build. + This has the effect of preventing make(1) from thinking + that some programs are out-of-date simply because the + system include files have changed. However, this option + should not be used when updating the entire NetBSD source + tree arbitrarily; it is suggested to use MKUPDATE=yes + instead in that case. - Default: Unset. + Default: Unset. - RELEASEDIR If set, specifies the directory to which a release(7) - layout will be written at the end of a "make release". - If specified, must be an absolute path. + RELEASEDIR If set, specifies the directory to which a release(7) + layout will be written at the end of a "make release". + If specified, must be an absolute path. - Note: build.sh will provide a default of releasedir (in - the top-level .OBJDIR) unless run in `expert' mode. + Note: build.sh will provide a default of releasedir (in + the top-level .OBJDIR) unless run in `expert' mode. - Default: Unset. + Default: Unset. BUILDING "make" command line options @@ -1317,4 +1316,4 @@ CAVEATS in object directories. Instead, one may have to manually remove the files. Consult the UPDATING file for notices concerning this. -NetBSD June 4, 2023 NetBSD +NetBSD June 5, 2023 NetBSD diff --git a/doc/BUILDING.mdoc b/doc/BUILDING.mdoc index c036e86d03be..4cb4dc857a84 100644 --- a/doc/BUILDING.mdoc +++ b/doc/BUILDING.mdoc @@ -1,4 +1,4 @@ -.\" $NetBSD: BUILDING.mdoc,v 1.140 2023/06/04 20:08:21 lukem Exp $ +.\" $NetBSD: BUILDING.mdoc,v 1.141 2023/06/05 22:36:17 lukem Exp $ .\" .\" Copyright (c) 2001-2023 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -33,7 +33,7 @@ .\" Toolchain prefix for commands .ds toolprefix nb . -.Dd June 4, 2023 +.Dd June 5, 2023 .Dt BUILDING 8 .Os NetBSD .\" turn off hyphenation @@ -253,7 +253,9 @@ Several environment variables control the behaviour of .Nx builds. . -.Bl -tag -width 15n +.Bl -tag -width 14n +. +.\" These entries are sorted alphabetically. . .It Sy HOST_CC Path name to C compiler used to create the toolchain. @@ -444,10 +446,11 @@ This list is not comprehensive; all supported variables and their defaults are documented in .Xr mk.conf 5 . . -.Bl -tag -width 15n +.Bl -tag -width 14n . .\" These entries are sorted alphabetically. -.\" Keep in sync with canonical reference share/man/man5/mk.conf.5. +.\" Keep in sync with canonical reference share/man/man5/mk.conf.5 +.\" and with share/mk/bsd.README. . .It Sy BSDOBJDIR The real path to the object directory tree for the @@ -986,7 +989,14 @@ This also has implications on full builds (see next subsection). .It Sy MKX11 .YorN Indicates whether X11 is built and installed from -.Sy X11SRCDIR . +.Sy X11SRCDIR , +and whether the X sets will be created. +.Pp +.Em Note : +If +.Dq yes , +requires +.Sy MKINET6=yes . .DFLTn . .It Sy NETBSDSRCDIR @@ -1099,7 +1109,9 @@ and do not affect manually building subtrees of the .Nx source code. . -.Bl -tag -width 15n +.Bl -tag -width 14n +. +.\" These entries are sorted alphabetically. . .It Sy INSTALLBOOT_BOARDS A list of boards to create bootable images for.