nrelease - fix/improve livecd
[dragonfly.git] / share / man / man5 / make.conf.5
1 .\" Copyright (c) 2000
2 .\"     Mike W. Meyer
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
14 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
17 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23 .\" SUCH DAMAGE.
24 .\"
25 .\" $FreeBSD: src/share/man/man5/make.conf.5,v 1.12.2.30 2003/05/18 17:05:55 brueffer Exp $
26 .\"
27 .Dd December 19, 2022
28 .Dt MAKE.CONF 5
29 .Os
30 .Sh NAME
31 .Nm make.conf
32 .Nd system build information
33 .Sh DESCRIPTION
34 The file
35 .Nm
36 contains settings that control the compilation of the
37 .Dx
38 sources.
39 The file
40 .Nm
41 is generally created by the system administrator when the values need
42 to be changed from their defaults.
43 .Pp
44 The purpose of
45 .Nm
46 is not to run commands or perform compilation actions
47 directly.
48 Instead, it is included by the various makefiles in
49 .Pa /usr/src
50 which conditionalize their internal actions according to the settings
51 found there.
52 .Pp
53 The
54 .Pa /etc/make.conf
55 file is included from the appropriate
56 .Pa Makefile
57 which specifies the default settings for all the available options.
58 Options need only be specified in
59 .Pa /etc/make.conf
60 when the system administrator wishes to override these defaults.
61 .Pp
62 The build procedures occur in three areas: world, kernel, and
63 documentation.
64 Variables set in
65 .Nm
66 may be applicable during builds in one, two, or all of these areas.
67 They may be specified for a particular build via the
68 .Fl D
69 option of
70 .Xr make 1 .
71 .Pp
72 The following lists provide a name and short description for each
73 variable you can use during the indicated builds.
74 The values of variables flagged as
75 .Vt bool
76 are ignored; the variable being set at all (even to
77 .Dq Li FALSE
78 or
79 .Dq Li NO )
80 causes it to be treated as if it were set.
81 .Pp
82 The following list provides a name and short description for variables
83 that are used for all builds, or are used by the
84 .Pa makefiles
85 for things other than builds.
86 .Bl -tag -width Ar
87 .It Va CPUTYPE
88 .Pq Vt str
89 Controls which processor should be targeted for generated code.
90 This controls processor-specific optimizations in certain code
91 (currently only OpenSSL) as well as modifying the value of
92 .Va CFLAGS
93 and
94 .Va COPTFLAGS
95 to contain the appropriate optimization directive to
96 .Xr gcc 1 .
97 The automatic setting of
98 .Va CFLAGS
99 and
100 .Va COPTFLAGS
101 may be overridden using the
102 .Va NO_CPU_CFLAGS
103 and
104 .Va NO_CPU_COPTFLAGS
105 variables, respectively.  Refer to
106 .Pa /usr/share/examples/etc/defaults/make.conf
107 for a list of recognized
108 .Va CPUTYPE
109 options.
110 .It Va CCVER
111 .Pq Vt str
112 Controls which GCC version to use by default.
113 It should be set as
114 .Li CCVER?=
115 so as not to interfere with overrides from userland.
116 We currently recommend that an override NOT be set in
117 .Pa /etc/make.conf .
118 Currently accepted values for compilers which are part of
119 .Dx
120 are
121 .Dq gcc47
122 and
123 .Dq gcc80
124 (default).
125 All other values will handled according to the settings in
126 .Xr compilers.conf 5 .
127 .It Va WORLD_CCVER
128 .Pq Vt str
129 Controls which version of GCC builds the base system, including
130 the kernel.
131 .Dq gcc80
132 is the default value.
133 .It Va LDVER
134 .Pq Vt str
135 Controls which linker to use by default.  Currently accepted
136 values are
137 .Dq ld.gold
138 (GNU gold linker, default) and
139 .Dq ld.bfd
140 (classic GNU ld linker).
141 .It Va WORLD_LDVER
142 .Pq Vt str
143 Controls which linker builds the base system, including
144 the kernel.
145 .Dq ld.gold
146 is the default value.
147 .It Va BINUTILSVER
148 .Pq Vt str
149 Controls which binutils to use by default.
150 Currently accepted values are
151 .Dq binutils227
152 and
153 .Dq binutils234
154 (default).
155 .It Va WORLD_BINUTILSVER
156 .Pq Vt str
157 Controls which version of binutils builds the base system, including
158 the kernel.
159 .Dq binutils234
160 is the default value.
161 .It Va WORLD_CFLAGS
162 .Pq Vt str
163 Controls the compiler setting when compiling C code.
164 Optimization levels are controlled by
165 .Va WORLD_CCOPTLEVEL .
166 .Va BDECFLAGS
167 is provided as a set of
168 .Xr gcc 1
169 settings suggested by
170 .An Bruce Evans Aq Mt bde@FreeBSD.org
171 for developing and testing changes.
172 They can be used safely, if set, by:
173 .Bd -literal -offset indent
174 WORLD_CFLAGS+=${BDECFLAGS}
175 .Ed
176 .It Va WORLD_CCOPTLEVEL
177 (str) Allows to override default compiler optimization level
178 .Fl \&Ox .
179 Common levels are: 0, 1, 2, 3, g, s, fast.
180 Use of
181 .Fl O3
182 and
183 .Fl Ofast
184 is strongly discouraged.
185 .It Va DEBUG_FLAGS
186 .Pq Vt str
187 Similar to
188 .Va WORLD_CFLAGS
189 but it will cause
190 .Va STRIP
191 to be set to a blank value, if set.
192 Typically,
193 .Va DEBUG_FLAGS
194 is set to
195 .Fl g
196 for compiling with debug symbols.
197 .It Va NO_CPU_CFLAGS
198 .Pq Vt str
199 Setting this variable will prevent CPU specific compiler flags
200 from being automatically added to
201 .Va CFLAGS
202 during compile time.
203 .It Va CXXFLAGS
204 .Pq Vt str
205 Controls the compiler settings when compiling C++ code.
206 .Va CXXFLAGS
207 is initially set to the value of
208 .Va CFLAGS .
209 If you want to add to the
210 .Va CXXFLAGS
211 value, use
212 .Dq Li +=
213 instead of
214 .Dq Li = .
215 .It Va CSTD
216 .Pq Vt str
217 The default C standard to use when compiling world and kernel C code.
218 Default is
219 .Li gnu11 .
220 .It Va INSTALL
221 .Pq Vt str
222 the default install command.
223 To have components compared before doing the install, use
224 .Bd -literal -offset indent
225 INSTALL="install -C"
226 .Ed
227 .It Va NO_BACKUP
228 .Pq Vt str
229 Inhibit automatic backup of world binaries as port of
230 .Dq installworld
231 .Xr make 1
232 target.
233 Default is unset.
234 .It Va WORLD_BACKUP
235 .Pq Vt str
236 defines where system binaries will be backed up for the
237 .Dq backupworld
238 .Xr make 1
239 target.
240 The default is
241 .Dq /var/backups/world_backup .
242 .It Va AUTO_BACKUP
243 .Pq Vt str
244 defines where system binaries will be backed up automatically
245 as part of the
246 .Dq installworld
247 .Xr make 1
248 target.
249 The default is
250 .Dq Ev MAKEOBJDIRPREFIX Ns /world_binaries/ Ns Ev DESTDIR .
251 .It Va LOCAL_DIRS
252 .Pq Vt str
253 List of directories that should be entered when running
254 .Xr make 1
255 in
256 .Pa /usr/src .
257 .It Va MAKE_SHELL
258 .Pq Vt str
259 Controls the shell used internally by
260 .Xr make 1
261 to process the command scripts in makefiles.
262 .Xr sh 1 ,
263 .Xr ksh 1 ,
264 and
265 .Xr csh 1
266 all currently supported.
267 .Bd -literal -offset indent
268 MAKE_SHELL?=sh
269 .Ed
270 .It Va MODULES_OVERRIDE
271 .Pq Vt str
272 Set to a list of modules to build instead of all of them.
273 .It Va MTREE_FOLLOWS_SYMLINKS
274 .Pq Vt str
275 Set this to
276 .Dq Fl L
277 to cause
278 .Xr mtree 8
279 to follow symlinks.
280 .It Va STRIP
281 .Pq Vt str
282 Set this to the flag to pass to the
283 .Xr strip 1
284 command.
285 If set to a blank value, debug symbols will not be removed.
286 .Va STRIP
287 is automatically set to a blank value if
288 .Va DEBUG_FLAGS
289 is set.
290 .It Va WANT_HESIOD
291 .Pq Vt bool
292 Set this to build
293 .Xr hesiod 3
294 support into libc.
295 .It Va NO_NS_CACHING
296 .Pq Vt bool
297 Set this to disable name caching in the nsswitch subsystem.
298 The generic caching daemon,
299 .Xr nscd 8 ,
300 will not be built either if this option is set.
301 .It Va NO_WERROR
302 Set this if you don't want
303 .Fl Werror
304 to be added to
305 .Va CWARNFLAGS
306 or used in the kernel build.
307 .It Va STATIC_LOCALES
308 .Pq Vt str
309 Set to a list of locales to build into statically-linked binaries.
310 Currently supported locales are: BIG5 EUC EUCTW ISO2022 MSKanji UTF8
311 .El
312 .Pp
313 The following list provides a name and short description for variables
314 that are only used doing a kernel build:
315 .Bl -tag -width Ar
316 .It Va BOOT_COMCONSOLE_PORT
317 .Pq Vt str
318 The port address to use for the console if the boot blocks have
319 been configured to use a serial console instead of the keyboard/video card.
320 .It Va BOOT_COMCONSOLE_SPEED
321 .Pq Vt int
322 The baud rate to use for the console if the boot blocks have
323 been configured to use a serial console instead of the keyboard/video card.
324 .It Va COPTFLAGS
325 .Pq Vt str
326 Controls the compiler optimization settings for kernel and module compiles.
327 .It Va KCFLAGS
328 Allows you to add additional compiler flags for kernel and module compiles.
329 But use
330 .Va COPTFLAGS
331 .Pq Vt str
332 to specify any optimization overrides, as some modules may have to override
333 it to enforce a lower optimization level.
334 .It Va KERNCONF
335 .Pq Vt str
336 Controls which kernel configurations will be
337 built by
338 .Dq Li "${MAKE} buildkernel"
339 and installed by
340 .Dq Li "${MAKE} installkernel" .
341 For example,
342 .Bd -literal -offset indent
343 KERNCONF=MINE DEBUG X86_64_GENERIC OTHERMACHINE
344 .Ed
345 .Pp
346 will build the kernels specified by the config files
347 .Pa MINE , DEBUG , X86_64_GENERIC ,
348 and
349 .Pa OTHERMACHINE ,
350 and install the kernel specified by the config file
351 .Pa MINE .
352 It defaults to
353 .Pa X86_64_GENERIC .
354 .It Va NO_CPU_COPTFLAGS
355 .Pq Vt str
356 Setting this variable will prevent CPU specific compiler flags
357 from being automatically added to
358 .Va COPTFLAGS
359 during compile time.
360 .It Va NO_KERNELCLEAN
361 .Pq Vt bool
362 Set this to skip the clean target when using
363 .Dq Li "${MAKE} buildkernel" .
364 .It Va NO_KERNELCONFIG
365 .Pq Vt bool
366 Set this to skip running
367 .Xr config 8
368 during
369 .Dq Li "${MAKE} buildkernel" .
370 .It Va NO_KERNELDEPEND
371 .Pq Vt bool
372 Set this to skip running
373 .Dq Li "${MAKE} depend"
374 during
375 .Dq Li "${MAKE} buildkernel" .
376 .It Va NO_KERNEL_OLD_STRIP
377 .Pq Vt bool
378 Set this to skip stripping debugging symbols from old kernel and modules
379 (kernel.old, modules.old) during
380 .Dq Li "${MAKE} installkernel" .
381 .It Va NO_MODULES
382 .Pq Vt bool
383 Set to not build modules with the kernel.
384 .El
385 .Pp
386 The following list provides a name and short description for variables
387 that are used during the world build:
388 .Bl -tag -width Ar
389 .It Va ENABLE_SUID_SSH
390 .Pq Vt bool
391 Set this to install
392 .Xr ssh 1
393 with the setuid bit turned on.
394 .It Va MODULES_WITH_WORLD
395 .Pq Vt bool
396 Set to build modules with the system instead of the kernel.
397 .It Va NO_ALTBINUTILS
398 .Pq Vt bool
399 Set to not build the alternative (non-default) set of binutils.
400 .It Va NO_ALTCOMPILER
401 .Pq Vt bool
402 Set to not build the designated secondary compiler (GCC 4.7 and others).
403 .It Va NO_CVS
404 .Pq Vt bool
405 Set to not build CVS.
406 .It Va NO_GAMES
407 .Pq Vt bool
408 Set to not build games.
409 .It Va NO_GDB
410 .Pq Vt bool
411 Set to not build
412 .Xr gdb 1
413 .It Va NO_INITRD
414 .Pq Vt bool
415 Set to not build initrd image.
416 .It Va NO_LPR
417 .Pq Vt bool
418 Set to not build
419 .Xr lpr 1
420 and related programs.
421 .It Va NO_SHARE
422 .Pq Vt bool
423 Set to not enter or install to the share subdirectory.
424 .It Va NOCLEAN
425 .Pq Vt bool
426 Set this to disable cleaning during
427 .Dq Li "make buildworld" .
428 This should not be set unless you know what you are doing.
429 .It Va NOCLEANDIR
430 .Pq Vt bool
431 Set this to run
432 .Dq Li "${MAKE} clean"
433 instead of
434 .Dq Li "${MAKE} cleandir" .
435 .It Va NOFSCHG
436 .Pq Vt bool
437 Set to not install certain components with flag schg.
438 This is useful in a jailed environment.
439 .It Va NOMAN
440 .Pq Vt bool
441 Set to not build manual pages
442 .It Va NOMANCOMPRESS
443 .Pq Vt bool
444 Set to not compress the manual pages.
445 .It Va NOPROFILE
446 .Pq Vt bool
447 Set to avoid compiling profiled libraries.
448 .It Va PPP_NOSUID
449 .Pq Vt bool
450 Set to disable the installation of
451 .Xr ppp 8
452 with the set-user-ID bit on.
453 .It Va XAUTH_PATH
454 .Pq Vt str
455 The path to the xauth program used by OpenSSH client.
456 .It Va SENDMAIL_MC
457 .Pq Vt str
458 The default
459 .Xr m4 1
460 configuration file to use at install time.
461 The value should include the full path to the
462 .Pa .mc
463 file, e.g.,
464 .Pa /etc/mail/myconfig.mc .
465 Use with caution as a make install will overwrite any existing
466 .Pa /etc/mail/sendmail.cf .
467 .It Va SENDMAIL_SUBMIT_MC
468 .Pq Vt str
469 The default
470 .Xr m4 1
471 configuration file for mail submission
472 to use at install time.
473 The value should include the full path to the
474 .Pa .mc
475 file, e.g.,
476 .Pa /etc/mail/mysubmit.mc .
477 Use with caution as a make install will overwrite any existing
478 .Pa /etc/mail/submit.cf .
479 .It Va SENDMAIL_CF_DIR
480 .Pq Vt str
481 Override the default location for the
482 .Xr m4 1
483 configuration files used to build a
484 .Pa .cf
485 file from a
486 .Pa .mc
487 file.
488 The default is
489 .Pa /usr/local/share/sendmail/cf .
490 .It Va SENDMAIL_M4_FLAGS
491 .Pq Vt str
492 Flags passed to
493 .Xr m4 1
494 when building a
495 .Pa .cf
496 file from a
497 .Pa .mc
498 file.
499 .It Va SENDMAIL_MAP_PERMS
500 .Pq Vt str
501 Mode to use when generating alias and map database files using
502 .Pa /etc/mail/Makefile .
503 The default value is 0640.
504 .It Va THREAD_LIB
505 .Pq Vt str
506 Set to configure the system's default threading library.
507 The default and only available setting is
508 .Li thread_xu .
509 .It Va WANT_INSTALLER
510 .Pq Vt bool
511 Set to build the installer.
512 .It Va WANT_NETGRAPH7
513 .Pq Vt bool
514 Set to build a newer, experimental
515 .Xr netgraph 4
516 userland.
517 It has to be accompanied by
518 .Dv NETGRAPH7*
519 options in the kernel.
520 .El
521 .Pp
522 The following list provides a name and short description for variables
523 that are used when performing various audit builds.
524 .Bl -tag -width Ar
525 .It Va FORMAT_AUDIT
526 Enable extra format checking related warnings.
527 .It Va WARNS_AUDIT
528 Include skipped or moved warning flags for a given
529 .Va WARNS
530 level in the
531 .Pa makefiles .
532 .El
533 .Sh FILES
534 .Bl -tag -width /etc/defaults/make.conf -compact
535 .It Pa /etc/defaults/make.conf
536 .It Pa /etc/make.conf
537 .It Pa /usr/src/Makefile
538 .It Pa /usr/src/Makefile.inc1
539 .El
540 .Sh SEE ALSO
541 .Xr gcc 1 ,
542 .Xr install 1 ,
543 .Xr make 1 ,
544 .Xr lpd 8
545 .Sh HISTORY
546 The
547 .Nm
548 file appeared sometime before
549 .Fx 4.0 .
550 .Sh AUTHORS
551 This manual page was written by
552 .An Mike W. Meyer Aq Mt mwm@mired.org .