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