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