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