1.\" $NetBSD: mk.conf.5,v 1.108 2023/07/23 16:52:37 lukem Exp $ 2.\" 3.\" Copyright (c) 1999-2023 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Luke Mewburn. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd July 23, 2023 31.Dt MK.CONF 5 32.Os 33.\" turn off hyphenation 34.hym 999 35. 36.Sh NAME 37.Nm mk.conf 38.Nd make configuration file 39. 40.Sh DESCRIPTION 41The 42.Nm 43file overrides various parameters used during the build of the system. 44. 45.Sh NETBSD SYSTEM VARIABLES 46. 47Listed below are the 48.Nm 49variables that may be set that affect the 50.Nx 51system build, 52the values to which each may be set, 53a brief description of what each variable does, 54references to relevant manual pages, 55notes (including any interaction with 56.Sy build.sh ) , 57and the default value of each variable. 58. 59.de DFLT 60.Pp 61.Em Default : 62.. 63.de DFLTn 64.DFLT 65.Dq no . 66.. 67.de DFLTu 68.DFLT 69Unset. 70.. 71.de DFLTy 72.DFLT 73.Dq yes . 74.. 75.de NODEF 76.Pp 77Forced to 78.Dq no 79if 80.Sy \\$* 81is defined, 82usually in the Makefile before any 83.Xr make 1 84.Cm \&.include 85directives. 86.. 87.de NOVAR 88.Pp 89Forced to 90.Dq no 91if 92.Sy \\$* . 93.. 94.de YorN 95Can be set to 96.Dq yes 97or 98.Dq no . 99.. 100. 101.Bl -tag -width 14n 102. 103.\" These entries are sorted alphabetically. 104. 105.It Sy BSDOBJDIR 106The real path to the object directory tree for the 107.Nx 108source tree. 109.DFLT 110.Dq Pa /usr/obj . 111. 112.It Sy BSDSRCDIR 113The real path to the 114.Nx 115source tree, if 116.Sy NETBSDSRCDIR 117isn't defined. 118.DFLT 119.Dq Pa /usr/src . 120. 121.It Sy BUILD 122If defined, 123.Sq "make install" 124checks that the 125.Xr make 1 126targets in the source directories are up-to-date and 127re-makes them if they are out of date, instead of blindly trying to install 128out of date or non-existent 129.Xr make 1 130targets. 131.DFLTu 132. 133.It Sy BUILDID 134Identifier for the build. 135If set, this should be a short string that is suitable for use as 136part of a file or directory name. 137The identifier will be appended to object directory names; if 138.Sy OBJMACHINE 139is also set, then 140.Pa \&. Ns Sy BUILDID 141is appended after 142.Pa \&. Ns Sy MACHINE . 143The identifier will also be used as part of the kernel version string, 144which can be shown by 145.Dq Li uname \-v . 146.DFLTu 147. 148.It Sy BUILDINFO 149Optional multi-line string containing information about the build. 150This will appear in 151.Sy DESTDIR Ns Pa /etc/release , 152and it will be stored in the 153.Va buildinfo 154variable in any kernels that are built. 155When such kernels are booted, the 156.Xr sysctl 7 157.Va kern.buildinfo 158variable will report this value. 159The string may contain backslash escape sequences, such as 160.Dq "\e\e" 161(representing a backslash character) 162and 163.Dq "\en" 164(representing a newline). 165.DFLTu 166. 167.It Sy BUILDSEED 168.Xr g++ 1 169uses random numbers when compiling C++ code. 170This variable seeds the 171.Xr g++ 1 172random number generator using 173.Fl frandom-seed 174with this value. 175By default, it is set to 176.Do NetBSD-( Ns Em majorversion ) Dc . 177Using a fixed value causes C++ binaries to be the same when 178built from the same sources, resulting in identical (reproducible) builds. 179Additional information is available in the 180.Xr g++ 1 181documentation of 182.Fl frandom-seed . 183.DFLTu 184. 185.It Sy CDEXTRA 186A space-separated list of files or directories that will be 187added to the CD-ROM image that may be create by the 188.Sy build.sh 189.Dq iso-image 190or 191.Dq iso-image-source 192operations. 193Files will be added to the root of the CD-ROM image, 194whereas directories will be copied recursively. 195If relative paths are specified, they will be converted to 196absolute paths before being used. 197.Em Note : 198If using 199.Sy build.sh , 200multiple paths may be specified via multiple 201.Fl C 202options, or via a single option whose argument contains multiple 203space-separated paths. 204.DFLTu 205. 206.It Sy CONFIGOPTS 207Additional options to 208.Xr config 1 209when building kernels. 210.DFLTu 211. 212.It Sy COPTS 213Extra options for the C compiler. 214Should be appended to (e.g., 215.Sy COPTS+=-g ) , 216rather than explicitly set. 217.Pp 218.Em Note : 219.Sy CPUFLAGS , 220not 221.Sy COPTS , 222should be used for 223compiler options that select CPU-related options. 224.Pp 225.Em Note : 226.Sy CFLAGS 227should never be set in 228.Nm . 229. 230.It Sy CPUFLAGS 231Additional options passed to the compiler/assembler to select 232CPU instruction set options, CPU tuning options, etc. 233.Pp 234.Em Note : 235Such options should not be specified in 236.Sy COPTS , 237because some parts of the build process need to override 238CPU-related compiler options. 239.DFLTu 240. 241.It Sy DESTDIR 242Directory to contain the built 243.Nx 244system. 245If set, special options are passed to the compilation tools to 246prevent their default use of the host system's 247.Sy /usr/include , /usr/lib , 248and so forth. 249This pathname must be an absolute path, and should 250.Em not 251end with a slash 252.Pq / 253character. 254(For installation into the system's root directory, set 255.Sy DESTDIR 256to an empty string, not to 257.Dq / ) . 258The directory must reside on a file system which supports long file 259names and hard links. 260.Pp 261.Em Note : 262.Sy build.sh 263will provide a default of 264.Dq Pa destdir . Ns Sy MACHINE 265(in the top-level 266.Sy .OBJDIR ) 267unless run in 268.Sq expert 269mode with the 270.Fl E 271option. 272.DFLT 273Empty string if 274.Sy USETOOLS=yes ; 275otherwise unset. 276. 277.It Sy EXTERNAL_TOOLCHAIN 278If defined, this variable indicates the root directory of 279an external toolchain which will be used to build the tree. 280For example, if a platform is a 281.Sy TOOLCHAIN_MISSING 282platform, 283.Sy EXTERNAL_TOOLCHAIN 284can be used to re-enable the cross-compile framework. 285.Pp 286If 287.Sy EXTERNAL_TOOLCHAIN 288is defined, act as 289.Sy MKGCC=no , 290since the external version of the compiler may not be 291able to build the library components of the in-tree compiler. 292.Pp 293This variable should be used in conjunction with an appropriate 294.Sy HAVE_GCC 295or 296.Sy HAVE_LLVM 297setting to control the compiler options. 298.Pp 299.Em Note : 300This variable is not yet used in as many places as it should be. 301Expect the exact semantics of this variable to change in the short 302term as parts of the cross-compile framework continue to be cleaned up. 303.DFLTu 304. 305.It Sy INSTALLBOOT_BOARDS 306A list of 307.Sy evbarm 308boards to create bootable images for. 309If corresponding U-Boot packages are installed, 310bootable images are created as part of a release. 311See the 312.Bk -words 313.Fl o Sy board= Ns Ar name 314.Ek 315option of 316.Xr installboot 8 . 317.DFLTu 318. 319.It Sy INSTALLWORLDDIR 320Directory for the top-level 321.Xr make 1 322.Dq installworld 323target to install to. 324If specified, must be an absolute path. 325.DFLT 326.Dq Pa / . 327. 328.It Sy KERNARCHDIR 329Directory under 330.Sy KERNSRCDIR 331containing the machine dependent kernel sources. 332.DFLT 333.Dq Pa arch/ Ns Sy MACHINE . 334. 335.It Sy KERNCONFDIR 336Directory containing the kernel configuration files. 337.DFLT 338.Dq Sy KERNSRCDIR Ns Pa / Ns Sy KERNARCHDIR Ns Pa /conf . 339. 340.It Sy KERNEL_DIR Pq No experimental 341.YorN 342Indicates if a top-level directory 343.Sy /netbsd/ 344is created. 345If 346.Dq yes , 347the directory will contain a kernel file 348.Pa /netbsd/kernel 349and a corresponding modules directory 350.Pa /netbsd/modules/ . 351System bootstrap procedures will be modified to search for the kernel 352and modules in the 353.Pa /netbsd/ 354directory. 355This is intended to simplify system upgrade and rollback procedures by 356keeping the kernel and its associated modules together in one place. 357.Pp 358If 359.Dq no , 360the kernel file will be stored in 361.Pa /netbsd 362and the modules will be stored within the 363.Pa /stand/${ARCH}/ 364directory hierarchy. 365.Pp 366The 367.Sy KERNEL_DIR 368option is a work-in-progress, and is highly experimental. 369It is also subject to change without notice. 370.DFLTn 371. 372.It Sy KERNOBJDIR 373Directory for kernel builds. 374For example, the kernel 375.Sy GENERIC 376will be compiled in 377.Sy KERNOBJDIR Ns Pa /GENERIC . 378.DFLT 379.Dq Sy MAKEOBJDIRPREFIX Ns Pa / Ns Sy KERNSRCDIR Ns Pa / Ns Sy KERNARCHDIR Ns Pa /compile 380if it exists or the 381.Xr make 1 382.Dq obj 383target is being made; 384otherwise 385.Dq Sy KERNSRCDIR Ns Pa / Ns Sy KERNARCHDIR Ns Pa /compile . 386. 387.It Sy KERNSRCDIR 388Directory at the top of the kernel source. 389.DFLT 390.Dq Sy NETBSDSRCDIR Ns Pa /sys . 391. 392.It Sy LOCALTIME 393The name of the 394.Xr tzfile 5 395timezone file in the directory 396.Pa /usr/share/zoneinfo 397to symbolically link 398.Sy DESTDIR Ns Pa /etc/localtime 399to. 400.DFLT 401.Dq UTC . 402. 403.It Sy MAKEVERBOSE 404Level of verbosity of status messages. 405Supported values: 406.Bl -tag -width 2n 407.It 0 408No descriptive messages or commands executed by 409.Xr make 1 410are shown. 411.It 1 412Brief messages are shown describing what is being done, 413but the actual commands executed by 414.Xr make 1 415are not shown. 416.It 2 417Descriptive messages are shown as above (prefixed with a 418.Sq # ) , 419and ordinary commands performed by 420.Xr make 1 421are shown. 422.It 3 423In addition to the above, all commands performed by 424.Xr make 1 425are shown, even if they would ordinarily have been hidden 426through use of the 427.Dq \&@ 428prefix in the relevant makefile. 429.It 4 430In addition to the above, commands executed by 431.Xr make 1 432are traced through use of the 433.Xr sh 1 434.Dq Fl x 435flag. 436.El 437.DFLT 438.Sy 2 . 439. 440.It Sy MKAMDGPUFIRMWARE 441.YorN 442Indicates whether to install the 443.Pa /libdata/firmware/amdgpu 444directory, which is necessary for the 445.Xr amdgpu 4 446AMD RADEON GPU video driver. 447.DFLT 448.Dq yes 449on 450.Sy i386 451and 452.Sy x86_64 ; 453.Dq no 454on other platforms. 455. 456.It Sy MKARGON2 457.YorN 458Indicates whether the Argon2 hash is enabled in libcrypt. 459.DFLTy 460. 461.It Sy MKARZERO 462.YorN 463Indicates whether 464.Xr ar 1 465should zero the timestamp, uid, and gid in the archive 466for reproducible builds. 467.DFLT 468The value of 469.Sy MKREPRO 470(if defined), otherwise 471.Dq no . 472. 473.It Sy MKATF 474.YorN 475Indicates whether the Automated Testing Framework (ATF) 476will be built and installed. 477This also controls whether the 478.Nx 479test suite will be built and installed, 480as the tests rely on ATF and cannot be built without it. 481.NOVAR MKCXX=no 482.DFLTy 483. 484.It Sy MKBINUTILS 485.YorN 486Indicates whether any of the binutils tools or libraries 487will be built and installed. 488That is, the libraries 489.Sy libbfd , 490.Sy libiberty , 491or any of the things that depend upon them, e.g. 492.Xr as 1 , 493.Xr ld 1 , 494.Xr dbsym 8 , 495or 496.Xr mdsetimage 8 . 497.NOVAR TOOLCHAIN_MISSING!=no 498.DFLTy 499. 500.It Sy MKBSDGREP 501.YorN 502Determines which implementation of 503.Xr grep 1 504will be built and installed. 505If 506.Dq yes , 507use the BSD implementation. 508If 509.Dq no , 510use the GNU implementation. 511.DFLTn 512. 513.It Sy MKBSDTAR 514.YorN 515Determines which implementation of 516.Xr cpio 1 517and 518.Xr tar 1 519will be built and installed. 520If 521.Dq yes , 522use the 523.Sy libarchive Ns - Ns 524based implementations. 525If 526.Dq no , 527use the 528.Xr pax 1 529based implementations. 530.DFLTy 531. 532.It Sy MKCATPAGES 533.YorN 534Indicates whether preformatted plaintext manual pages will be created 535and installed. 536.NOVAR MKMAN=no No or Sy MKSHARE=no 537.DFLTn 538. 539.It Sy MKCLEANSRC 540.YorN 541Indicates whether 542.Sq "make clean" 543and 544.Sq "make cleandir" 545will delete file names in 546.Sy CLEANFILES 547or 548.Sy CLEANDIRFILES 549from both the object directory, 550.Sy .OBJDIR , 551and the source directory, 552.Sy .SRCDIR . 553.Pp 554If 555.Dq yes , 556then these file names will be deleted relative to both 557.Sy .OBJDIR 558and 559.Sy .CURDIR . 560If 561.Dq no , 562then the deletion will be performed relative to 563.Sy .OBJDIR 564only. 565.DFLTy 566. 567.It Sy MKCLEANVERIFY 568.YorN 569Controls whether 570.Sq "make clean" 571and 572.Sq "make cleandir" 573will verify that files have been deleted. 574If 575.Dq yes , 576then file deletions will be verified using 577.Xr ls 1 . 578If 579.Dq no , 580then file deletions will not be verified. 581.DFLTy 582. 583.It Sy MKCOMPAT 584.YorN 585Indicates whether support for multiple ABIs is to be built and 586installed. 587.NODEF NOCOMPAT 588.DFLT 589.Dq yes 590on 591.Sy aarch64 592(without gcc), 593.Sy mips64 , 594.Sy powerpc64 , 595.Sy riscv64 , 596.Sy sparc64 , 597and 598.Sy x86_64 ; 599.Dq no 600on other platforms. 601. 602.It Sy MKCOMPATMODULES 603.YorN 604Indicates whether the compat kernel modules will be built and installed. 605.NOVAR MKCOMPAT=no 606.DFLT 607.Dq yes 608on 609.Sy evbppc-powerpc 610and 611.Sy mips64 ; 612.Dq no 613on other platforms. 614. 615.It Sy MKCOMPATTESTS 616.YorN 617Indicates whether the 618.Nx 619test suite for 620.Pa src/compat 621will be built and installed. 622.NOVAR MKCOMPAT=no 623.DFLTn 624. 625.It Sy MKCOMPATX11 626.YorN 627Indicates whether the X11 libraries will be built and installed. 628.NOVAR MKCOMPAT=no 629.DFLTn 630. 631.It Sy MKCOMPLEX 632.YorN 633Indicates whether the 634.Lb libm 635is compiled with support for 636.In complex.h . 637.DFLTy 638. 639.It Sy MKCROSSGDB 640.YorN 641Create a cross-gdb as a host tool. 642.DFLTn 643. 644.It Sy MKCTF 645.YorN 646Indicates whether CTF tools are to be built and installed. 647If 648.Dq yes , 649the tools will be used to generate and manipulate 650CTF data of ELF binaries during build. 651.NODEF NOCTF 652.Pp 653This is disabled internally for standalone programs in 654.Pa /usr/mdec . 655.DFLT 656.Dq yes 657on 658.Sy aarch64 , 659.Sy amd64 , 660and 661.Sy i386 ; 662.Dq no 663on other platforms. 664. 665.It Sy MKCVS 666.YorN 667Indicates whether 668.Xr cvs 1 669will be built and installed. 670.DFLTy 671. 672.It Sy MKCXX 673.YorN 674Indicates whether C++ support is enabled. 675.Pp 676If 677.Dq no , 678C++ compilers and software will not be built, 679and acts as 680.Sy MKATF=no MKGCCCMDS=no MKGDB=no MKGROFF=no MKKYUA=no . 681.DFLTy 682. 683.It Sy MKDEBUG 684.YorN 685Indicates whether debug information should be generated for 686all userland binaries. 687The result is collected as an additional 688.Sy debug 689and 690.Sy xdebug 691set and installed in 692.Sy DESTDIR Ns Pa /usr/libdata/debug . 693.NODEF NODEBUG 694.Pp 695If 696.Dq yes , 697acts as 698.Sy MKSTRIPSYM=no . 699. 700.DFLTn 701. 702.It Sy MKDEBUGKERNEL 703.YorN 704Indicates whether debugging symbols will be built for kernels 705by default; pretend as if 706.Em makeoptions DEBUG="-g" 707is specified in kernel configuration files. 708This will also put the debug kernel 709.Pa netbsd.gdb 710in the kernel sets. 711See 712.Xr options 4 713for details. 714This is useful if a cross-gdb is built as well (see 715.Sy MKCROSSGDB ) . 716.DFLTn 717. 718.It Sy MKDEBUGLIB 719.YorN 720Indicates whether debug libraries 721.Sy ( lib*_g.a ) 722will be built and installed. 723Debug libraries are compiled with 724.Dq Li -g -DDEBUG . 725.NODEF NODEBUGLIB 726.DFLTn 727. 728.It Sy MKDEBUGTOOLS 729.YorN 730Indicates whether debug information 731.Sy ( lib*_g.a ) 732will be included in the build toolchain. 733.DFLTn 734. 735.It Sy MKDEPINCLUDES 736.YorN 737Indicates whether to add 738.Cm \&.include 739statements in the 740.Pa .depend 741files instead of inlining the contents of the 742.Pa *.d 743files. 744This is useful when stale dependencies are present, 745to list the exact files that need refreshing, but 746it is possibly slower than inlining. 747.DFLTn 748. 749.It Sy MKDOC 750.YorN 751Indicates whether system documentation destined for 752.Sy DESTDIR Ns Pa /usr/share/doc 753will be installed. 754.NODEF NODOC 755.NOVAR MKSHARE=no 756.DFLTy 757. 758.It Sy MKDTB 759.YorN 760Indicates whether the devicetree blobs will be built and installed. 761.DFLT 762.Dq yes 763on 764.Sy aarch64 , 765.Sy armv6 , 766.Sy armv7 , 767.Sy riscv32 , 768and 769.Sy riscv64 ; 770.Dq no 771on other platforms. 772. 773.It Sy MKDTC 774.YorN 775Indicates whether the Device Tree Compiler (dtc) will be built and installed. 776.DFLTy 777. 778.It Sy MKDTRACE 779.YorN 780Indicates whether the kernel modules, utilities, and libraries for 781.Xr dtrace 1 782support are to be built and installed. 783.DFLT 784.Dq yes 785on 786.Sy aarch64 , 787.Sy amd64 , 788and 789.Sy i386 ; 790.Dq no 791on other platforms. 792. 793.It Sy MKDYNAMICROOT 794.YorN 795Indicates whether all programs should be dynamically linked, 796and to install shared libraries required by 797.Pa /bin 798and 799.Pa /sbin 800and the shared linker 801.Xr ld.elf_so 1 802into 803.Pa /lib . 804If 805.Dq no , 806link programs in 807.Pa /bin 808and 809.Pa /sbin 810statically. 811.DFLT 812.Dq no 813on 814.Sy ia64 ; 815.Dq yes 816on other platforms. 817. 818.It Sy MKFIRMWARE 819.YorN 820Indicates whether to install the 821.Pa /libdata/firmware 822directory, which is necessary for various drivers, including: 823.Xr athn 4 , 824.Xr bcm43xx 4 , 825.Xr bwfm 4 , 826.Xr ipw 4 , 827.Xr iwi 4 , 828.Xr iwm 4 , 829.Xr iwn 4 , 830.Xr otus 4 , 831.Xr ral 4 , 832.Xr rtwn 4 , 833.Xr rum 4 , 834.Xr run 4 , 835.Xr urtwn 4 , 836.Xr wpi 4 , 837.Xr zyd 4 , 838and the Tegra 124 SoC. 839.DFLT 840.Dq yes 841on 842.Sy amd64 , 843.Sy cobalt , 844.Sy evbarm , 845.Sy evbmips , 846.Sy evbppc , 847.Sy hpcarm , 848.Sy hppa , 849.Sy i386 , 850.Sy mac68k , 851.Sy macppc , 852.Sy sandpoint , 853and 854.Sy sparc64 ; 855.Dq no 856on other platforms. 857. 858.It Sy MKGCC 859.YorN 860Indicates whether 861.Xr gcc 1 862or any related libraries 863.Pq Sy libg2c , libgcc , libobjc , libstdc++ 864will be built and installed. 865.NOVAR TOOLCHAIN_MISSING!=no No or Sy EXTERNAL_TOOLCHAIN No is defined 866.DFLTy 867. 868.It Sy MKGCCCMDS 869.YorN 870Indicates whether 871.Xr gcc 1 872will be built and installed. 873If 874.Dq no , 875then 876.Sy MKGCC 877controls if the 878GCC libraries will be built and installed. 879.NOVAR MKCXX=no 880.DFLT 881.Dq no 882on 883.Sy m68000 ; 884.Dq yes 885on other platforms. 886. 887.It Sy MKGDB 888.YorN 889Indicates whether 890.Xr gdb 1 891will be built and installed. 892.NOVAR MKCXX=no No or Sy TOOLCHAIN_MISSING!=no 893.DFLT 894.Dq no 895on 896.Sy ia64 897and 898.Sy or1k ; 899.Dq yes 900on other platforms. 901. 902.It Sy MKGROFF 903.YorN 904Indicates whether 905.Xr groff 1 906will be built, installed, 907and used to format some of the PostScript and PDF 908documentation. 909.NOVAR MKCXX=no 910.DFLTy 911. 912.It Sy MKGROFFHTMLDOC 913.YorN 914Indicates whether to use 915.Xr groff 1 916to generate HTML for miscellaneous articles which 917sometimes requires software not in the base installation. 918Does not affect the generation of HTML man pages. 919.DFLTn 920. 921.It Sy MKHESIOD 922.YorN 923Indicates whether the Hesiod infrastructure 924(libraries and support programs) will be built and installed. 925.DFLTy 926. 927.It Sy MKHOSTOBJ 928.YorN 929If 930.Dq yes , 931then for programs intended to be run on the compile host, 932the name, release, and architecture of the host operating system 933will be suffixed to the name of the object directory created by 934.Dq make obj . 935(This allows multiple host systems to compile 936.Nx 937for a single target architecture.) 938If 939.Dq no , 940then programs built to be run on the compile host will use the same 941object directory names as programs built to be run on the target 942architecture. 943.DFLTn 944. 945.It Sy MKHTML 946.YorN 947Indicates whether the HTML manual pages are created and installed. 948.NODEF NOHTML 949.NOVAR MKMAN=no No or Sy MKSHARE=no 950.DFLTy 951. 952.It Sy MKIEEEFP 953.YorN 954Indicates whether code for IEEE754/IEC60559 conformance 955will be built and installed. 956Has no effect on most platforms. 957.DFLTy 958. 959.It Sy MKINET6 960.YorN 961Indicates whether INET6 (IPv6) infrastructure 962(libraries and support programs) will be built and installed. 963.Pp 964.Em Note : 965.Sy MKINET6 966must not be set to 967.Dq no 968if 969.Sy MKX11!=no . 970.DFLTy 971. 972.It Sy MKINFO 973.YorN 974Indicates whether GNU Info files, used for the documentation for 975most of the compilation tools, will be built and installed. 976.NODEF NOINFO 977.NOVAR MKSHARE=no 978.DFLTy 979. 980.It Sy MKIPFILTER 981.YorN 982Indicates whether the 983.Xr ipf 4 984programs, headers, and other components will be built and installed. 985.DFLTy 986. 987.It Sy MKISCSI 988.YorN 989Indicates whether the iSCSI library and applications are 990built and installed. 991.DFLT 992.Dq no 993on 994.Sy m68000 ; 995.Dq yes 996on other platforms. 997. 998.It Sy MKKERBEROS 999.YorN 1000Indicates whether the Kerberos v5 infrastructure 1001(libraries and support programs) will be built and installed. 1002Caution: the default 1003.Xr pam 8 1004configuration requires that Kerberos be present even if not used. 1005Do not install a userland without Kerberos without also either 1006updating the 1007.Xr pam.conf 5 1008files or disabling PAM via 1009.Sy MKPAM . 1010Otherwise all logins will fail. 1011.DFLTy 1012. 1013.It Sy MKKMOD 1014.YorN 1015Indicates whether kernel modules will be built and installed. 1016.DFLT 1017.Dq no 1018on 1019.Sy or1k ; 1020.Dq yes 1021on other platforms. 1022. 1023.It Sy MKKYUA 1024.YorN 1025Indicates whether Kyua (the testing infrastructure used by 1026.Nx ) 1027will be built and installed. 1028.NOVAR MKCXX=no 1029.Pp 1030.Em Note : 1031This does not control the installation of the tests themselves. 1032The tests rely on the ATF libraries and therefore their build is controlled 1033by the 1034.Sy MKATF 1035variable. 1036.DFLT 1037.Dq no 1038until the import of Kyua is done and validated. 1039. 1040.It Sy MKLDAP 1041.YorN 1042Indicates whether the Lightweight Directory Access Protocol (LDAP) 1043infrastructure 1044(libraries and support programs) will be built and installed. 1045.DFLTy 1046. 1047.It Sy MKLIBCSANITIZER 1048.YorN 1049Indicates whether to use the sanitizer for libc, 1050using the sanitizer defined by 1051.Sy USE_LIBCSANITIZER . 1052.NODEF NOLIBCSANITIZER 1053.DFLTn 1054. 1055.It Sy MKLIBCXX 1056.YorN 1057Indicates if libc++ will be built and installed 1058(usually for 1059.Xr clang++ 1 ) . 1060.DFLT 1061.Dq yes 1062if 1063.Sy MKLLVM=yes ; 1064otherwise 1065.Dq no . 1066. 1067.It Sy MKLIBSTDCXX 1068.YorN 1069Indicates if libstdc++ will be built and installed 1070(usually for 1071.Xr g++ 1 ) . 1072.DFLTy 1073. 1074.It Sy MKLINKLIB 1075.YorN 1076Indicates whether all of the shared library infrastructure 1077will be built and installed. 1078.Pp 1079If 1080.Dq no , 1081prevents: 1082.Bl -dash -compact 1083.It 1084installation of the 1085.Sy *.a 1086libraries 1087.It 1088installation of the 1089.Sy *_pic.a 1090libraries on PIC systems 1091.It 1092building of 1093.Sy *.a 1094libraries on PIC systems 1095.It 1096installation of 1097.Sy .so 1098symlinks on ELF systems 1099.El 1100.Pp 1101I.e, only install the shared library (and the 1102.Pa .so.major 1103symlink on ELF). 1104.NODEF NOLINKLIB 1105.Pp 1106If 1107.Dq no , 1108acts as 1109.Sy MKLINT=no MKPICINSTALL=no MKPROFILE=no . 1110.DFLTy 1111. 1112.It Sy MKLINT 1113.YorN 1114Indicates whether 1115.Xr lint 1 1116will be run against portions of the 1117.Nx 1118source code during the build, and whether lint libraries will be 1119installed into 1120.Sy DESTDIR Ns Pa /usr/libdata/lint . 1121.NODEF NOLINT 1122.NOVAR MKLINKLIB=no 1123.DFLTn 1124. 1125.It Sy MKLLVM 1126.YorN 1127Indicates whether 1128.Xr clang 1 1129is installed as a host tool and target compiler. 1130.Pp 1131If 1132.Dq yes , 1133acts as 1134.Sy MKLIBCXX=yes . 1135.Pp 1136.Em Note : 1137Use of 1138.Xr clang 1 1139as the system compiler is controlled by 1140.Sy HAVE_LLVM . 1141.DFLTn 1142. 1143.It Sy MKLLVMRT 1144.YorN 1145Indicates whether to build the LLVM PIC libraries necessary 1146for the various Mesa backend and the native JIT of the target 1147architecture, if supported. 1148(Radeon R300 and newer, LLVMPIPE for most.) 1149.DFLT 1150If 1151.Sy MKX11=yes 1152and 1153.Sy HAVE_MESA_VER>=19 , 1154.Dq yes 1155on 1156.Sy aarch64 , 1157.Sy amd64 , 1158and 1159.Sy i386 ; 1160otherwise 1161.Dq no . 1162. 1163.It Sy MKLVM 1164.YorN 1165If not 1166.Dq no , 1167build and install the logical volume manager. 1168.DFLTy 1169. 1170.It Sy MKMAKEMANDB 1171.YorN 1172Indicates if the whatis tools 1173.Xr ( apropos 1 , 1174.Xr whatis 1 , 1175.Xr getNAME 8 , 1176.Xr makemandb 8 , 1177and 1178.Xr makewhatis 8 ) , 1179should be built, installed, and used to 1180create and install the 1181.Pa whatis.db . 1182.DFLTy 1183. 1184.It Sy MKMAN 1185.YorN 1186Indicates whether manual pages will be installed. 1187.NODEF NOMAN 1188.NOVAR MKSHARE=no 1189.Pp 1190If 1191.Dq no , 1192acts as 1193.Sy MKCATPAGES=no MKHTML=no . 1194.DFLTy 1195. 1196.It Sy MKMANDOC 1197.YorN 1198Indicates whether 1199.Xr mandoc 1 1200will be built and installed, and used to create and install 1201catman and HTML pages. 1202.Pp 1203If 1204.Dq no , 1205use 1206.Xr groff 1 1207instead of 1208.Xr mandoc 1 . 1209.NODEF NOMANDOC No or Sy NOMANDOC . Ns Ar target No (for a given Xr make 1 target Ar target ) 1210.Pp 1211Only used if 1212.Sy MKMAN=yes . 1213.DFLTy 1214. 1215.It Sy MKMANZ 1216.YorN 1217Indicates whether manual pages should be compressed with 1218.Xr gzip 1 1219at installation time. 1220.Pp 1221Only used if 1222.Sy MKMAN=yes . 1223.DFLTn 1224. 1225.It Sy MKMDNS 1226.YorN 1227Indicates whether the mDNS (Multicast DNS) infrastructure 1228(libraries and support programs) will be built and installed. 1229.DFLTy 1230. 1231.It Sy MKNLS 1232.YorN 1233Indicates whether Native Language System (NLS) locale zone files will be 1234built and installed. 1235.NODEF NONLS 1236.NOVAR MKSHARE=no 1237.DFLTy 1238. 1239.It Sy MKNOUVEAUFIRMWARE 1240.YorN 1241Indicates whether to install the 1242.Pa /libdata/firmware/nouveau 1243directory, which is necessary for the 1244.Xr nouveau 4 1245NVIDIA video driver. 1246.DFLT 1247.Dq yes 1248on 1249.Sy aarch64 , 1250.Sy i386 , 1251and 1252.Sy x86_64 , 1253.Dq no 1254on other platforms. 1255. 1256.It Sy MKNPF 1257.YorN 1258Indicates whether the NPF packet filter is to be built and installed. 1259.DFLTy 1260. 1261.It Sy MKNSD 1262.YorN 1263Indicates whether the Name Server Daemon (NSD) is to be built and installed. 1264.DFLTn 1265. 1266.It Sy MKOBJ 1267.YorN 1268Indicates whether object directories will be created when running 1269.Dq make obj . 1270If 1271.Dq no , 1272then all built files will be located inside the regular source tree. 1273.NODEF NOOBJ 1274.Pp 1275If 1276.Dq no , 1277acts as 1278.Sy MKOBJDIRS=no . 1279.Pp 1280.Em Note : 1281Setting 1282.Sy MKOBJ 1283to 1284.Dq no 1285is not recommended and may cause problems when updating the tree with 1286.Xr cvs 1 . 1287.DFLTy 1288. 1289.It Sy MKOBJDIRS 1290.YorN 1291Indicates whether object directories will be created automatically 1292(via a 1293.Dq make obj 1294pass) at the start of a build. 1295.NOVAR MKOBJ=no 1296.Pp 1297.Em Note : 1298If using 1299.Sy build.sh , 1300the default is 1301.Dq yes . 1302This may be set to 1303.Dq no 1304by giving 1305.Sy build.sh 1306the 1307.Fl o 1308option. 1309.DFLTn 1310. 1311.It Sy MKPAM 1312.YorN 1313Indicates whether the 1314.Xr pam 8 1315framework (libraries and support files) will be built and installed. 1316The pre-PAM code is not supported and may be removed in the future. 1317.DFLTy 1318. 1319.It Sy MKPCC 1320.YorN 1321Indicates whether 1322.Xr pcc 1 1323or any related libraries 1324.Pq Sy libpcc , libpccsoftfloat 1325will be built and installed. 1326.DFLTn 1327. 1328.It Sy MKPF 1329.YorN 1330Indicates whether the 1331.Xr pf 4 1332programs, headers, and LKM will be built and installed. 1333.DFLTy 1334. 1335.It Sy MKPIC 1336.YorN 1337Indicates whether shared objects and libraries will be created and 1338installed. 1339If 1340.Dq no , 1341the entire built system will be statically linked. 1342.NODEF NOPIC 1343.Pp 1344If 1345.Dq no , 1346acts as 1347.Sy MKPICLIB=no . 1348.DFLT 1349.Dq no 1350on 1351.Sy m68000 ; 1352.Dq yes 1353on other platforms. 1354. 1355.It Sy MKPICINSTALL 1356.YorN 1357Indicates whether the 1358.Xr ar 1 1359format libraries 1360.Sy ( lib*_pic.a ) , 1361used to generate shared libraries, are installed. 1362.NODEF NOPICINSTALL 1363.NOVAR MKLINKLIB=no 1364.DFLTn 1365. 1366.It Sy MKPICLIB 1367.YorN 1368Indicates whether the 1369.Xr ar 1 1370format libraries 1371.Sy ( lib*_pic.a ) , 1372used to generate shared libraries. 1373.NOVAR MKPIC=no 1374.DFLT 1375.Dq no 1376on 1377.Sy vax ; 1378.Dq yes 1379on other platforms. 1380. 1381.It Sy MKPIE 1382.YorN 1383Indicates whether Position Independent Executables (PIE) 1384will be built and installed. 1385.NODEF NOPIE 1386.NOVAR COVERITY_TOP_CONFIG No is defined 1387.Pp 1388This is disabled internally for standalone programs in 1389.Pa /usr/mdec . 1390.DFLT 1391.Dq yes 1392on 1393.Sy aarch64 , 1394.Sy arm , 1395.Sy i386 , 1396.Sy m68k , 1397.Sy mips , 1398.Sy sh3 , 1399.Sy sparc64 , 1400and 1401.Sy x86_64 ; 1402.Dq no 1403on other platforms. 1404. 1405.It Sy MKPIGZGZIP 1406.YorN 1407If 1408.Dq no , 1409the 1410.Xr pigz 1 1411utility is not installed as 1412.Xr gzip 1 . 1413.DFLTn 1414. 1415.It Sy MKPOSTFIX 1416.YorN 1417Indicates whether Postfix will be built and installed. 1418.DFLTy 1419. 1420.It Sy MKPROFILE 1421.YorN 1422Indicates whether profiled libraries 1423.Sy ( lib*_p.a ) 1424will be built and installed. 1425.NODEF NOPROFILE 1426.NOVAR MKLINKLIB=no 1427.DFLT 1428.Dq no 1429on 1430.Sy or1k , 1431.Sy riscv32 , 1432and 1433.Sy riscv64 1434(due to toolchain problems with profiled code); 1435.Dq yes 1436on other platforms. 1437. 1438.It Sy MKRADEONFIRMWARE 1439.YorN 1440Indicates whether to install the 1441.Pa /libdata/firmware/radeon 1442directory, which is necessary for the 1443.Xr radeon 4 1444AMD RADEON GPU video driver. 1445.DFLT 1446.Dq yes 1447on 1448.Sy aarch64 , 1449.Sy i386 , 1450and 1451.Sy x86_64 , 1452.Dq no 1453on other platforms. 1454. 1455.It Sy MKRELRO 1456Indicates whether to enable support for Relocation Read-Only (RELRO). 1457Supported values: 1458.Bl -tag -width partial 1459.It partial 1460Set the non-PLT GOT to read-only. 1461.It full 1462Set the non-PLT GOT to read-only and 1463also force immediate symbol binding, 1464unless 1465.Sy NOFULLRELRO 1466is defined and not 1467.Dq no 1468(usually in the Makefile before any 1469.Xr make 1 1470.Cm \&.include 1471directives). 1472.It no 1473Disable RELRO. 1474.El 1475.NODEF NORELRO 1476.DFLT 1477.Dq partial 1478on 1479.Sy aarch64 , 1480.Sy i386 , 1481and 1482.Sy x86_64 ; 1483.Dq no 1484on other platforms. 1485. 1486.It Sy MKREPRO 1487.YorN 1488Indicates whether builds are to be reproducible. 1489If 1490.Dq yes , 1491two builds from the same source tree will produce the same build 1492results. 1493.Pp 1494Used as the default for 1495.Sy MKARZERO . 1496.Pp 1497.Em Note : 1498This may be set to 1499.Dq yes 1500by giving 1501.Sy build.sh 1502the 1503.Fl P 1504option. 1505.DFLTn 1506. 1507.It Sy MKREPRO_TIMESTAMP 1508Unix timestamp. 1509When 1510.Sy MKREPRO 1511is set, the timestamp of all files in the sets will be set 1512to this value. 1513.Pp 1514.Em Note : 1515This may be set automatically to the latest source tree timestamp 1516using 1517.Xr cvslatest 1 1518by giving 1519.Sy build.sh 1520the 1521.Fl P 1522option. 1523.DFLTu 1524. 1525.It Sy MKRUMP 1526.YorN 1527Indicates whether the 1528.Xr rump 3 1529headers, libraries, and programs are to be installed. 1530.NOVAR COVERITY_TOP_CONFIG No is defined 1531.Pp 1532See also 1533variables that start with 1534.Sy RUMPUSER_ 1535or 1536.Sy RUMP_ . 1537.DFLTy 1538. 1539.It Sy MKSANITIZER 1540.YorN 1541Indicates whether to use the sanitizer to compile userland programs, 1542using the sanitizer defined by 1543.Sy USE_SANITIZER . 1544.NODEF NOSANITIZER 1545.DFLTn 1546. 1547.It Sy MKSHARE 1548.YorN 1549Indicates whether files destined to reside in 1550.Sy DESTDIR Ns Pa /usr/share 1551will be built and installed. 1552.NODEF NOSHARE 1553.Pp 1554If 1555.Dq no , 1556acts as 1557.Sy MKCATPAGES=no MKDOC=no MKINFO=no MKHTML=no MKMAN=no MKNLS=no . 1558.DFLTy 1559. 1560.It Sy MKSKEY 1561.YorN 1562Indicates whether the S/key infrastructure 1563(libraries and support programs) will be built and installed. 1564.DFLTy 1565. 1566.It Sy MKSLJIT 1567.YorN 1568Indicates whether to enable support for sljit 1569(stack-less platform-independent Just in Time (JIT) compiler) 1570private library and tests. 1571.DFLT 1572.Dq yes 1573on 1574.Sy i386 , 1575.Sy sparc , 1576and 1577.Sy x86_64 ; 1578.Dq no 1579on other platforms. 1580. 1581.It Sy MKSOFTFLOAT 1582.YorN 1583Indicates whether the compiler generates output containing 1584library calls for floating point and possibly soft-float library 1585support. 1586.Pp 1587Forced to 1588.Dq yes 1589on 1590.Sy arm 1591without 1592.Sq hf , 1593.Sy coldfire , 1594.Sy emips , 1595.Sy or1k , 1596and 1597.Sy sh3 . 1598.DFLT 1599.Dq yes 1600on 1601.Sy mips64 ; 1602.Dq no 1603on other platforms. 1604. 1605.It Sy MKSTATICLIB 1606.YorN 1607Indicates whether the normal static libraries 1608.Sy ( lib*_g.a ) 1609will be built and installed. 1610.NODEF NOSTATICLIB 1611.DFLTy 1612. 1613.It Sy MKSTATICPIE 1614.YorN 1615Indicates whether support for static PIE binaries 1616will be built and installed. 1617These binaries use a special support in crt0.o for 1618resolving relative relocations and require linker support. 1619.DFLT 1620.Dq yes 1621on 1622.Sy i386 1623and 1624.Sy x86_64 ; 1625.Dq no 1626on other platforms. 1627. 1628.It Sy MKSTRIPIDENT 1629.YorN 1630Indicates whether RCS IDs, for use with 1631.Xr ident 1 , 1632should be stripped from program binaries and shared libraries. 1633.DFLTn 1634. 1635.It Sy MKSTRIPSYM 1636.YorN 1637Indicates whether all local symbols should be stripped from shared libraries. 1638If 1639.Dq yes , 1640strip all local symbols from shared libraries; 1641the effect is equivalent to the 1642.Fl x 1643option of 1644.Xr ld 1 . 1645If 1646.Dq no , 1647strip only temporary local symbols; the effect is equivalent 1648to the 1649.Fl X 1650option of 1651.Xr ld 1 . 1652Keeping non-temporary local symbols 1653such as static function names is useful on using DTrace for 1654userland libraries and getting a backtrace from a 1655.Xr rumpkernel 7 1656kernel 1657loading shared libraries. 1658.NOVAR MKDEBUG=yes 1659.DFLTy 1660. 1661.It Sy MKTEGRAFIRMWARE 1662.YorN 1663Indicates whether to install the 1664.Pa /libdata/firmware/nvidia 1665directory, which is necessary for the 1666NVIDIA Tegra XHCI driver. 1667.DFLT 1668.Dq yes 1669on 1670.Sy evbarm ; 1671.Dq no 1672on other platforms. 1673. 1674.It Sy MKTPM 1675.YorN 1676Indicates whether to install the Trusted Platform Module (TPM) 1677infrastructure. 1678.DFLTn 1679. 1680.It Sy MKUNBOUND 1681.YorN 1682Indicates whether the 1683.Xr unbound 8 1684DNS resolver will be built and installed. 1685.DFLTy 1686. 1687.It Sy MKUNPRIVED 1688.YorN 1689Indicates whether an unprivileged install will occur. 1690The user, group, permissions, and file flags, will not be set on 1691the installed items; instead the information will be appended to 1692a file called 1693.Pa METALOG 1694in 1695.Sy DESTDIR . 1696The 1697.Pa METALOG 1698contents are used during the generation of the distribution 1699tar files to ensure that the appropriate file ownership is stored. 1700This allows a non-root 1701.Sq "make install" . 1702.DFLTn 1703. 1704.It Sy MKUPDATE 1705.YorN 1706Indicates whether all install operations intended to write to 1707.Sy DESTDIR 1708will compare file timestamps before installing, and skip the install 1709phase if the destination files are up-to-date. 1710.Pp 1711For top-level builds this this implies the effects of 1712.Sy NOCLEANDIR 1713(i.e., 1714.Dq make cleandir 1715is avoided). 1716.Pp 1717.Em Note : 1718This may be set to 1719.Dq yes 1720by giving 1721.Sy build.sh 1722the 1723.Fl u 1724option. 1725.DFLTn 1726. 1727.It Sy MKX11 1728.YorN 1729Indicates whether X11 will be built and installed from 1730.Sy X11SRCDIR , 1731and whether the X sets will be created. 1732.Pp 1733.Em Note : 1734If 1735.Dq yes , 1736requires 1737.Sy MKINET6=yes . 1738.DFLTn 1739. 1740.It Sy MKX11FONTS 1741.YorN 1742If 1743.Dq no , 1744do not build and install the X fonts. 1745The xfont set is still created but will be empty. 1746.Pp 1747Only used if 1748.Sy MKX11=yes . 1749.DFLTy 1750. 1751.It Sy MKX11MOTIF 1752.YorN 1753If 1754.Dq yes , 1755build the native Xorg libGLw with Motif stubs. 1756Requires that Motif can be found via 1757.Sy X11MOTIFPATH . 1758.DFLTn 1759. 1760.It Sy MKXORG_SERVER 1761.YorN 1762Indicates whether the 1763.Xr Xorg 7 1764X server and drivers will be built and installed. 1765.DFLT 1766.Dq yes 1767on 1768.Sy alpha , 1769.Sy amd64 , 1770.Sy amiga , 1771.Sy bebox , 1772.Sy cats , 1773.Sy dreamcast , 1774.Sy ews4800mips , 1775.Sy evbarm , 1776.Sy evbmips , 1777.Sy evbppc , 1778.Sy hp300 , 1779.Sy hpcarm , 1780.Sy hpcmips , 1781.Sy hpcsh , 1782.Sy hppa , 1783.Sy i386 , 1784.Sy ibmnws , 1785.Sy iyonix , 1786.Sy luna68k , 1787.Sy mac68k , 1788.Sy macppc , 1789.Sy netwinder , 1790.Sy newsmips , 1791.Sy pmax , 1792.Sy prep , 1793.Sy ofppc , 1794.Sy sgimips , 1795.Sy shark , 1796.Sy sparc , 1797.Sy sparc64 , 1798.Sy vax , 1799and 1800.Sy zaurus ; 1801.Dq no 1802on other platforms. 1803. 1804.It Sy MKYP 1805.YorN 1806Indicates whether the YP (NIS) infrastructure 1807(libraries and support programs) will be built and installed. 1808.DFLTy 1809. 1810.It Sy MKZFS 1811.YorN 1812Indicates whether the ZFS kernel module and the utilities and 1813libraries used to manage the ZFS system are to be built and installed. 1814.Pp 1815.Em Note : 1816ZFS requires 64-bit atomic operations. 1817.DFLT 1818.Dq yes 1819on 1820.Sy aarch64 , 1821.Sy amd64 , 1822and 1823.Sy sparc64 ; 1824.Dq no 1825on other platforms. 1826. 1827.It Sy NETBSDSRCDIR 1828The path to the top level of the 1829.Nx 1830sources. 1831.DFLT 1832Top level of the 1833.Nx 1834source tree (as determined by the presence of 1835.Pa build.sh 1836and 1837.Pa tools/ ) 1838if 1839.Xr make 1 1840is run from within that tree; 1841otherwise 1842.Sy BSDSRCDIR 1843will be used. 1844. 1845.It Sy NETBSD_OFFICIAL_RELEASE 1846.YorN 1847Indicates whether the build creates an official 1848.Nx 1849release which is going to be available from 1850.Lk ftp.NetBSD.org 1851and/or 1852.Lk cdn.NetBSD.org 1853locations. 1854This variable modifies a few default paths in the installer 1855and also creates different links in the install documentation. 1856The auto-build cluster uses this variable to distinguish 1857.Sq daily 1858builds from real releases. 1859.DFLTu 1860.Pq I.e., Dq no . 1861. 1862.It Sy NOCLEANDIR 1863If set, avoids the 1864.Dq make cleandir 1865phase of a full build. 1866This has the effect of allowing only changed 1867files in a source tree to be recompiled. 1868This can speed up builds when updating only a few files in the tree. 1869.Pp 1870See also 1871.Sy MKUPDATE . 1872.DFLTu 1873. 1874.It Sy NODISTRIBDIRS 1875If set, avoids the 1876.Dq make distrib-dirs 1877phase of a full build. 1878This skips running 1879.Xr mtree 8 1880on 1881.Sy DESTDIR , 1882useful on systems where building as an unprivileged user, or where it is 1883known that the system-wide 1884.Xr mtree 8 1885files have not changed. 1886.DFLTu 1887. 1888.It Sy NOINCLUDES 1889If set, avoids the 1890.Dq make includes 1891phase of a full build. 1892This has the effect of preventing 1893.Xr make 1 1894from thinking that some programs are out-of-date simply because the 1895system include files have changed. 1896However, this option should not be used when updating the entire 1897.Nx 1898source tree arbitrarily; it is suggested to use 1899.Sy MKUPDATE=yes 1900instead in that case. 1901.DFLTu 1902. 1903.It Sy OBJMACHINE 1904If defined, creates objdirs of the form 1905.Pa obj . Ns Sy MACHINE , 1906where 1907.Sy MACHINE 1908is the current architecture (as per 1909.Sq "uname -m" ) . 1910.DFLTu 1911. 1912.It Sy RELEASEDIR 1913If set, specifies the directory to which a 1914.Xr release 7 1915layout will be written at the end of a 1916.Dq make release . 1917If specified, must be an absolute path. 1918.Pp 1919.Em Note : 1920.Sy build.sh 1921will provide a default of 1922.Dq Pa releasedir 1923(in the top-level 1924.Sy .OBJDIR ) 1925unless run in 1926.Sq expert 1927mode with the 1928.Fl E 1929option. 1930.DFLTu 1931. 1932.It Sy RUMPUSER_THREADS 1933Defines the threading implementation used by the 1934.Xr rumpuser 3 1935hypercall implementation. 1936Supported values: 1937.Bl -tag -width pthread 1938.It fiber 1939Use a fiber interface, with cooperatively scheduled contexts. 1940.It none 1941Do not support kernel threads. 1942.It pthread 1943Use 1944.Xr pthread 3 1945to implement threads. 1946.El 1947.DFLT 1948.Dq pthread . 1949. 1950.It Sy RUMP_CURLWP 1951Defines how 1952.Va curlwp 1953is obtained in the 1954.Xr rumpkernel 7 1955kernel. 1956.Va curlwp 1957is 1958a very frequently accessed thread-local variable, and optimizing 1959access has a significant performance impact. 1960Note that all options are not available on hosts/machine architectures. 1961Supported values: 1962.Bl -tag -width hypercall 1963.It hypercall 1964Use a hypercall to fetch the value. 1965.It register 1966Use a dedicated register. 1967(Implies compiling with 1968.Fl ffixed- Ns Ar reg ) . 1969.It __thread 1970Use the __thread feature to fetch value via 1971thread local storage (TLS). 1972.El 1973.DFLT 1974.Dq hypercall . 1975. 1976.It Sy RUMP_DEBUG 1977If defined, 1978indicates whether 1979.Xr rumpkernel 7 1980kernels are built with 1981.Fl DDEBUG . 1982.DFLTu 1983. 1984.It Sy RUMP_DIAGNOSTIC 1985.YorN 1986Indicates whether 1987.Xr rumpkernel 7 1988kernels are built with 1989.Fl DDIAGNOSTIC . 1990.DFLTy 1991. 1992.It Sy RUMP_KTRACE 1993.YorN 1994Indicates whether 1995.Xr rumpkernel 7 1996kernels are built with 1997.Fl DKTRACE . 1998.DFLTy 1999. 2000.It Sy RUMP_LOCKDEBUG 2001If defined, 2002indicates whether 2003.Xr rumpkernel 7 2004kernels are built with 2005.Fl DLOCKDEBUG . 2006.DFLTu 2007. 2008.It Sy RUMP_LOCKS_UP 2009.YorN 2010Indicates whether 2011.Xr rumpkernel 7 2012kernels are built with 2013uniprocess-optimized locking or not. 2014.Pp 2015If 2016.Dq yes , 2017build with uniprocess-optimized locking, which requires 2018.Ev RUMP_NCPU=1 2019in the environment at runtime. 2020.Pp 2021If 2022.Dq no , 2023build with multiprocessor-capable locking. 2024.DFLTn 2025. 2026.It Sy RUMP_NBCOMPAT 2027Selects which 2028.Nx 2029userland binary compatibility 2030.Dv COMPAT_ Ns Ar ver 2031kernel options are enabled in the 2032.Xr rumpkernel 7 2033kernels. 2034This option is useful only when building 2035.Xr rumpkernel 7 kernels 2036for 2037.Nx 2038userspace, and an empty value may be supplied elsewhere. 2039Supported (one or more, comma-separated) values: 2040.Bl -tag -width default 2041.It all 2042All supported release versions. 2043Equivalent to 2044.Dq 50,60,70,80,90 . 2045.It default 2046Default value. 2047Equivalent to 2048.Dq all , 2049although this default may change in the future. 2050.It none 2051No compatibility options are enabled. 2052.It 50 2053.Nx 20545.x compatibility, via 2055.Dv COMPAT_50 2056kernel option. 2057.It 60 2058.Nx 20596.x compatibility, via 2060.Dv COMPAT_60 2061kernel option. 2062.It 70 2063.Nx 20647.x compatibility, via 2065.Dv COMPAT_70 2066kernel option. 2067.It 80 2068.Nx 20698.x compatibility, via 2070.Dv COMPAT_80 2071kernel option. 2072.It 90 2073.Nx 20749.x compatibility, via 2075.Dv COMPAT_90 2076kernel option. 2077.El 2078.DFLT 2079.Dq all . 2080. 2081.It Sy RUMP_VIRTIF 2082.YorN 2083Indicates whether 2084.Xr rumpkernel 7 2085kernels are built with support for the 2086.Xr virt 4 2087network interface. 2088.Pp 2089If 2090.Dq no , 2091don't build with 2092.Xr virt 4 2093support, which may be necessary on systems that lack the 2094necessary headers, such as musl libc based Linux. 2095.DFLTy 2096. 2097.It Sy RUMP_VNODE_LOCKDEBUG 2098If defined, 2099indicates whether 2100.Xr rumpkernel 7 2101kernels are built with 2102.Fl DVNODE_LOCKDEBUG . 2103.DFLTu 2104. 2105.It Sy TOOLCHAIN_MISSING 2106.YorN 2107If not 2108.Dq no , 2109this indicates that the platform 2110.Dq Sy MACHINE_ARCH 2111being built does not have a working in-tree toolchain. 2112.Pp 2113If not 2114.Dq no , 2115acts as 2116.Sy MKBINUTILS=no MKGCC=no MKGDB=no . 2117.\" See MKGCCCMDS for example text if a platform defaults to yes. 2118.DFLTn 2119. 2120.It Sy TOOLDIR 2121Directory to hold the host tools, once built. 2122If specified, must be an absolute path. 2123This directory should be unique to a given host system and 2124.Nx 2125source tree. 2126(However, multiple target architectures may share the same 2127.Sy TOOLDIR ; 2128the target-architecture-dependent files have unique names.) 2129If unset, a default based 2130on the 2131.Xr uname 1 2132information of the host platform will be created in the 2133.Sy .OBJDIR 2134of 2135.Pa src . 2136.DFLTu 2137. 2138.It Sy USETOOLS 2139.YorN 2140Indicates whether the tools specified by 2141.Sy TOOLDIR 2142should be used as part of a build in progress. 2143Must be set to 2144.Dq yes 2145if cross-compiling. 2146Supported values: 2147.Bl -tag -width never 2148.It yes 2149Use the tools from 2150.Sy TOOLDIR . 2151.It no 2152Do not use the tools from 2153.Sy TOOLDIR , 2154but refuse to build native compilation tool components that are 2155version-specific for that tool. 2156.It never 2157Do not use the tools from 2158.Sy TOOLDIR , 2159even when building native tool components. 2160This is similar to the traditional 2161.Nx 2162build method, but does 2163.Em not 2164verify that the compilation tools in use are up-to-date enough in order 2165to build the tree successfully. 2166This may cause build or runtime problems when building the whole 2167.Nx 2168source tree. 2169.El 2170.DFLT 2171.Dq no 2172when using 2173.Aq bsd.*.mk 2174outside the 2175.Nx 2176source tree (detected automatically) or if 2177.Sy TOOLCHAIN_MISSING=yes ; 2178otherwise 2179.Dq yes . 2180. 2181.It Sy USE_FORT 2182.YorN 2183Indicates whether the so-called 2184.Dq FORTIFY_SOURCE 2185.Xr security 7 2186extensions are enabled; see 2187.Xr ssp 3 2188for details. 2189This imposes some performance penalty. 2190.NODEF NOFORT 2191.DFLTn 2192. 2193.It Sy USE_HESIOD 2194.YorN 2195Indicates whether Hesiod support is 2196enabled in the various applications that support it. 2197.NOVAR MKHESIOD=no 2198.DFLTy 2199. 2200.It Sy USE_INET6 2201.YorN 2202Indicates whether INET6 (IPv6) support is 2203enabled in the various applications that support it. 2204.NOVAR MKINET6=no 2205.DFLTy 2206. 2207.It Sy USE_JEMALLOC 2208.YorN 2209Indicates whether the 2210.Em jemalloc 2211allocator 2212.Pq which is designed for improved performance with threaded applications 2213is used instead of the 2214.Em phkmalloc 2215allocator 2216.Pq that was the default until Nx 5.0 . 2217.DFLTy 2218. 2219.It Sy USE_KERBEROS 2220.YorN 2221Indicates whether Kerberos v5 support is 2222enabled in the various applications that support it. 2223.NOVAR MKKERBEROS=no 2224.DFLTy 2225. 2226.It Sy USE_LDAP 2227.YorN 2228Indicates whether LDAP support is 2229enabled in the various applications that support it. 2230.NOVAR MKLDAP=no 2231.DFLTy 2232. 2233.It Sy USE_LIBCSANITIZER 2234Selects the sanitizer in libc to compile userland programs and libraries. 2235Supported values: 2236.Bl -tag -width undefined 2237.It undefined 2238Enables the micro-UBSan in the user mode (uUBSan) 2239undefined behaviour sanitizer. 2240The code is shared with the kernel mode variation (kUBSan). 2241The runtime runtime differs from the UBSan available in 2242.Sy MKSANITIZER . 2243The runtime is stripped down from C++ features, 2244and is invoked with 2245.Li -fsanitize=no-vptr 2246as that sanitizer is not supported. 2247The runtime configuration is restricted to the 2248.Ev LIBC_UBSAN 2249environment variable, that is designed to be safe for hardening. 2250.El 2251.Pp 2252The value of 2253.Sy USE_LIBCSANITIZER 2254is passed to the C and C++ compilers as the argument to 2255.Li -fsanitize= . 2256Additional sanitizer arguments can be passed through 2257.Sy LIBCSANITIZERFLAGS . 2258.Pp 2259Disabled if 2260.Sy MKLIBCSANITIZER=no . 2261.DFLT 2262.Dq undefined . 2263. 2264.It Sy USE_PAM 2265.YorN 2266Indicates whether 2267.Xr pam 8 2268support is enabled in the various applications that support it. 2269.NOVAR MKPAM=no 2270.DFLTy 2271. 2272.It Sy USE_PIGZGZIP 2273.YorN 2274Indicates whether 2275.Xr pigz 1 2276is used instead of 2277.Xr gzip 1 2278for multi-threaded gzip compression of the distribution tar sets. 2279.DFLTn 2280. 2281.It Sy USE_SANITIZER 2282Selects the sanitizer to compile userland programs and libraries. 2283Supported (one or more, comma-separated) values: 2284.Bl -tag -width safe-stack 2285.It address 2286A memory error detector. 2287.It cfi 2288A control flow detector. 2289.It dataflow 2290A general data flow analysis. 2291.It leak 2292A memory leak detector. 2293.It memory 2294An uninitialized memory read detector. 2295.It safe-stack 2296Protect against stack-based corruption. 2297.It scudo 2298The Scudo Hardened Allocator. 2299.It thread 2300A data race detector. 2301.It undefined 2302An undefined behavior detector. 2303.El 2304.Pp 2305The value of 2306.Sy USE_SANITIZER 2307is passed to the C and C++ compilers as the argument to 2308.Li -fsanitize= . 2309Additional sanitizer arguments can be passed through 2310.Sy SANITIZERFLAGS . 2311.Pp 2312The list of supported features and their valid combinations 2313depends on the compiler version and target CPU architecture. 2314.Pp 2315Disabled if 2316.Sy MKSANITIZER=no . 2317.DFLT 2318.Dq address . 2319. 2320.It Sy USE_SKEY 2321.YorN 2322Indicates whether S/key support is 2323enabled in the various applications that support it. 2324.NOVAR MKSKEY=no 2325.Pp 2326.Em Note : 2327This is mutually exclusive to 2328.Sy USE_PAM!=no . 2329.DFLTn 2330. 2331.It Sy USE_SSP 2332.YorN 2333Indicates whether GCC stack-smashing protection (SSP) support, 2334which detects stack overflows and aborts the program, 2335is enabled. 2336This imposes some performance penalty 2337(approximately 5%). 2338.Pp 2339This is disabled internally for standalone programs in 2340.Pa /usr/mdec . 2341.NODEF NOSSP 2342.NOVAR COVERITY_TOP_CONFIG No is defined 2343.DFLT 2344.Dq no 2345on 2346.Sy alpha , 2347.Sy hppa , 2348.Sy ia64 , 2349and 2350.Sy mips ; 2351.Dq yes 2352on other platforms if 2353.Sy USE_FORT=yes ; 2354otherwise 2355.Dq no . 2356. 2357.It Sy USE_XZ_SETS 2358.YorN 2359Indicates whether the distribution tar files are to be compressed 2360with 2361.Xr xz 1 2362instead of 2363.Xr gzip 1 2364or 2365.Xr pigz 1 . 2366.NOVAR USE_PIGZGZIP=yes 2367.DFLT 2368.Dq yes 2369on 2370.Sy aarch64 , 2371.Sy amd64 , 2372and 2373.Sy sparc64 , 2374.Dq no 2375on other platforms. 2376. 2377.It Sy USE_YP 2378.YorN 2379Indicates whether YP (NIS) support is 2380enabled in the various applications that support it. 2381.NOVAR MKYP=no 2382.DFLTy 2383. 2384.It Sy X11MOTIFPATH 2385Path of the Motif installation to use if 2386.Sy MKX11MOTIF=yes . 2387.DFLT 2388.Dq Pa /usr/pkg . 2389. 2390.It Sy X11SRCDIR 2391Directory containing the modular Xorg source. 2392If specified, must be an absolute path. 2393The main modular Xorg source is found in 2394.Sy X11SRCDIR Ns Pa /external/mit . 2395.DFLT 2396.Sy NETBSDSRCDIR Ns Pa /../xsrc , 2397if that exists; otherwise 2398.Dq Pa /usr/xsrc . 2399. 2400.El 2401. 2402.Sh PKGSRC SYSTEM VARIABLES 2403. 2404Please see the pkgsrc guide at 2405.Lk http://www.netbsd.org/Documentation/pkgsrc/ 2406or 2407.Pa pkgsrc/doc/pkgsrc.txt 2408for more variables used internally by the package system and 2409.Pa ${PKGSRCDIR}/mk/defaults/mk.conf 2410for package-specific examples. 2411. 2412.Sh OBSOLETE VARIABLES 2413. 2414These variables are obsolete. 2415. 2416.Bl -tag -width 14n 2417. 2418.\" These entries are sorted alphabetically. 2419. 2420.It Sy EXTSRCSRCDIR 2421Obsolete. 2422. 2423.It Sy MKBFD 2424Use 2425.Sy MKBINUTILS . 2426. 2427.It Sy MKCRYPTO 2428Obsolete. 2429. 2430.It Sy MKEXTSRC 2431Obsolete. 2432. 2433.It Sy MKKDEBUG 2434Use 2435.Sy MKDEBUGKERNEL . 2436. 2437.It Sy MKKERBEROS4 2438Obsolete. 2439. 2440.It Sy MKLLD 2441Obsolete. 2442. 2443.It Sy MKLLDB 2444Obsolete. 2445. 2446.It Sy MKMCLINKER 2447Obsolete. 2448. 2449.It Sy MKPERFUSE 2450Obsolete. 2451. 2452.It Sy MKTOOLSDEBUG 2453Use 2454.Sy MKDEBUGTOOLS . 2455. 2456.It Sy NBUILDJOBS 2457Use the 2458.Nm build.sh 2459and 2460.Xr make 1 2461option 2462.Fl j 2463instead. 2464. 2465.It Sy SHAREDSTRINGS 2466Obsolete. 2467. 2468.It Sy USE_COMBINE 2469Obsolete. 2470. 2471.It Sy USE_NEW_TOOLCHAIN 2472The new toolchain is now the default. 2473To disable, use 2474.Sy TOOLCHAIN_MISSING=yes . 2475. 2476.El 2477. 2478.Sh FILES 2479.Bl -tag -width /etc/mk.conf 2480. 2481.It Pa /etc/mk.conf 2482The 2483.Nm 2484file resides in 2485.Pa /etc . 2486. 2487.It Pa ${PKGSRCDIR}/mk/defaults/mk.conf 2488Examples for settings regarding the pkgsrc collection. 2489.El 2490. 2491.Sh SEE ALSO 2492.Xr apropos 1 , 2493.Xr ar 1 , 2494.Xr as 1 , 2495.Xr clang 1 , 2496.Xr clang++ 1 , 2497.Xr config 1 , 2498.Xr cpio 1 , 2499.Xr cvs 1 , 2500.Xr cvslatest 1 , 2501.Xr dtrace 1 , 2502.Xr g++ 1 , 2503.Xr gcc 1 , 2504.Xr gdb 1 , 2505.Xr groff 1 , 2506.Xr gzip 1 , 2507.Xr ident 1 , 2508.Xr ld 1 , 2509.Xr ld.elf_so 1 , 2510.Xr lint 1 , 2511.Xr ls 1 , 2512.Xr make 1 , 2513.Xr mandoc 1 , 2514.Xr pax 1 , 2515.Xr pcc 1 , 2516.Xr pigz 1 , 2517.Xr sh 1 , 2518.Xr tar 1 , 2519.Xr uname 1 , 2520.Xr whatis 1 , 2521.Xr xz 1 , 2522.Xr rump 3 , 2523.Xr rumpuser 3 , 2524.Xr ssp 3 , 2525.Xr amdgpu 4 , 2526.Xr athn 4 , 2527.Xr bcm43xx 4 , 2528.Xr bwfm 4 , 2529.Xr ipf 4 , 2530.Xr ipw 4 , 2531.Xr iwi 4 , 2532.Xr iwm 4 , 2533.Xr iwn 4 , 2534.Xr nouveau 4 , 2535.Xr options 4 , 2536.Xr otus 4 , 2537.Xr pf 4 , 2538.Xr radeon 4 , 2539.Xr ral 4 , 2540.Xr rtwn 4 , 2541.Xr rum 4 , 2542.Xr run 4 , 2543.Xr urtwn 4 , 2544.Xr virt 4 , 2545.Xr wpi 4 , 2546.Xr zyd 4 , 2547.Xr pam.conf 5 , 2548.Xr release 7 , 2549.Xr rumpkernel 7 , 2550.Xr security 7 , 2551.Xr Xorg 7 , 2552.Xr dbsym 8 , 2553.Xr getNAME 8 , 2554.Xr installboot 8 , 2555.Xr makemandb 8 , 2556.Xr makewhatis 8 , 2557.Xr mdsetimage 8 , 2558.Xr mtree 8 , 2559.Xr pam 8 , 2560.Xr unbound 8 , 2561.Pa /usr/share/mk/bsd.README , 2562.Pa src/BUILDING , 2563.Pa pkgsrc/doc/pkgsrc.txt , 2564.Lk http://www.netbsd.org/Documentation/pkgsrc/ 2565.Sh HISTORY 2566The 2567.Nm 2568file appeared in 2569.Nx 1.2 . 2570