1          $NetBSD: README.compileopts,v 1.17 2023/07/05 16:40:34 lukem Exp $
2
3This file describes compile-time options for rump kernels.
4
5Additionally, NetBSD build options will have an effect; see mk.conf(5)
6and src/share/mk/bsd.README for a description of NetBSD build options.
7
8Note: after changing an option, do a clean build.
9
10Global options:
11
12
13    RUMP_DIAGNOSTIC
14
15values:   yes|no
16defval:   yes
17effect:   Iff "yes", build with -DDIAGNOSTIC.
18
19
20    RUMP_DEBUG
21
22values:   <defined> / <undefined>
23defval:   <undefined>
24effect:   Iff defined, build with -DDEBUG.
25
26
27    RUMP_LOCKDEBUG
28
29values:   <defined> / <undefined>
30defval:   <undefined>
31effect:   Iff defined, build with -DLOCKDEBUG.
32
33
34    RUMP_VNODE_LOCKDEBUG
35
36values:   <defined> / <undefined>
37defval:   <undefined>
38effect:   Iff defined, build with -DVNODE_LOCKDEBUG.
39
40
41    RUMP_KTRACE
42
43values:   yes|no
44defval:   yes
45effect:   Iff "yes", build with -DKTRACE.
46
47
48    RUMP_LOCKS_UP
49
50values: yes|no
51defval:   no
52effect: If "yes", build rump kernel with uniprocess-optimized locking.
53          An implication of this is that RUMP_NCPU==1 is required at
54          runtime.  If "no", build with multiprocessor-capable locking.
55
56
57    RUMP_VIRTIF
58
59values:   yes|no
60defval:   yes
61effect:   Iff "yes", build the virt(4) network interface.  Turning this
62          off may be necessary on systems that lack the necessary headers,
63          e.g. musl libc based Linux.
64
65
66    RUMP_CURLWP
67
68values: hypercall/__thread/register or <undefined>
69defval: <undefined>
70effect: Control how curlwp is obtained in a rump kernel.  This is
71          a very frequently accessed thread-local variable, and optimizing
72          access has a significant performance impact.  Note that all
73          options are not available on hosts/machine architectures.
74          <undefined> - use default implementation (currently "hypercall")
75          hypercall   - use a hypercall to fetch the value
76          __thread    - use the __thread feature to fetch value via TLS
77          register    - use a dedicated register (implies -ffixed)
78
79
80    RUMP_NBCOMPAT
81
82values: comma-separated list of releases; e.g. "60,70";
83          or "all" or "default" or "none".  Currently default == all (but
84          might not be so in the future)
85defval:   all
86effect:   Builds NetBSD COMPAT_nn code for each of the elements in the list.
87          This option is useful only when building rump kernels for
88          NetBSD userspace, and an empty value may be supplied elsewhere.
89
90
91================================================================================
92
93Per-component options:
94
95    RUMP_SYM_NORENAME
96
97values: regexp matching symbol names
98defval: <undefined>
99effect: Causes matching symbols from the component to not be renamed
100          into the rump kernel symbol namespace (rumpns_).  This option
101          can only be used in embedded environments where there is full
102          control over the platform's namespace.  Conversely, this option
103          cannot be used in kernel components which are not meant to be
104          tied to a specific platform.  Note: the value is processed by
105          make and must be appropriately escaped.  example:
106          RUMP_SYM_NORENAME=HYPERVISOR_|block$$
107          will not rename "^HYPERVISOR_" or "^block$"
108
109
110================================================================================
111
112
113The rest of the options described in this file are not intended to be
114set by users, but by the package building rump kernels.
115
116
117    RUMP_KERNEL_IS_LIBC
118
119values:   defined / not defined
120effect: Iff defined, export normal system call symbols from libc.
121          For example, without this option rump_sys_open() is exported.
122          With this option, both open() and rump_sys_open() are exported.
123          This option is meant for building systems where a rump kernel
124          is the only operating system like component.
125
126
127    RUMP_LDSCRIPT
128
129values: no/GNU/sun/ctor
130defval: GNU
131effect: Select the linker script to be used for linking rump kernel shared
132          library components.
133          no        - do not use a linker script
134          GNU       - use a linker script for GNU ld 2.18 and later
135          sun       - use a linker script for the Solaris linker
136          ctor      - do not use a linker script, make the code
137                      generate __attribute__((constructor))
138