README.compileopts revision 1.8
11.8Spooka $NetBSD: README.compileopts,v 1.8 2015/04/23 14:49:26 pooka Exp $ 21.1Spooka 31.1SpookaThis file describes compile-time options for rump kernels. Additionally, 41.1SpookaNetBSD build options will have an effect. See src/share/mk/bsd.README 51.1Spookafor a desciption of NetBSD build options. 61.1Spooka 71.2SpookaNote: after changing an option, do a clean build. 81.2Spooka 91.5SpookaGlobal options: 101.5Spooka 111.1Spooka 121.1Spooka RUMP_DIAGNOSTIC 131.1Spooka 141.1Spookavalues: yes|no 151.1Spookadefval: yes 161.1Spookaeffect: Iff "yes", build with -DDIAGNOSTIC. 171.1Spooka 181.1Spooka 191.1Spooka RUMP_DEBUG 201.1Spooka 211.1Spookavalues: defined / not defined 221.1Spookaeffect: Iff defined, build with -DDEBUG. 231.1Spooka 241.1Spooka 251.1Spooka RUMP_LOCKDEBUG 261.1Spooka 271.1Spookavalues: defined / not defined 281.1Spookaeffect: Iff defined, build with -DLOCKDEBUG. 291.1Spooka 301.1Spooka 311.1Spooka RUMP_KTRACE 321.1Spooka 331.1Spookavalues: yes|no 341.1Spookadefval: yes 351.1Spookaeffect: Iff "yes", build with -DKTRACE. 361.1Spooka 371.1Spooka 381.1Spooka RUMP_LOCKS_UP 391.1Spooka 401.1Spookavalues: yes|no 411.1Spookadefval: no 421.1Spookaeffect: If "yes", build rump kernel with uniprocess-optimized locking. 431.1Spooka An implication of this is that RUMP_NCPU==1 is required at 441.1Spooka runtime. If "no", build with multiprocessor-capable locking. 451.1Spooka 461.1Spooka 471.1Spooka RUMP_UNREAL_ALLOCATORS 481.1Spooka 491.1Spookavalues: yes|no 501.1Spookadefval: no 511.1Spookaeffect: If "yes", build version of kmem_alloc, pool and pool_cache 521.1Spooka that directly relegate allocation to a hypercall. If "no", 531.1Spooka build the regular NetBSD memory allocators which use 541.1Spooka page-sized memory allocation hypercalls. 551.1Spooka 561.1Spooka 571.1Spooka RUMP_VIRTIF 581.1Spooka 591.1Spookavalues: yes|no 601.1Spookadefval: yes 611.1Spookaeffect: Iff "yes", build the virt(4) network interface. Turning this 621.1Spooka off may be necessary on systems that lack the necessary headers, 631.1Spooka e.g. musl libc based Linux. 641.1Spooka 651.1Spooka 661.3Spooka RUMP_CURLWP 671.3Spooka 681.3Spookavalues: hypercall/__thread/register or <undefined> 691.3Spookadefval: <undefined> 701.3Spookaeffect: Control how curlwp is obtained in a rump kernel. This is 711.3Spooka a very frequently accessed thread-local variable, and optimizing 721.3Spooka access has a significant performance impact. Note that all 731.3Spooka options are not available on hosts/machine architectures. 741.3Spooka <undefined> - use default implementation (currently "hypercall") 751.3Spooka hypercall - use a hypercall to fetch the value 761.3Spooka __thread - use the __thread feature to fetch value via TLS 771.3Spooka register - use a dedicated register (implies -ffixed) 781.3Spooka 791.3Spooka 801.8Spooka RUMP_NBCOMPAT 811.7Spooka 821.7Spookavalues: either a comma-separated list of releases (e.g. 50,60), or "all" 831.7Spookadefval: two previous NetBSD releases; check Makefile.rump 841.8Spookaeffect: Builds NetBSD COMPAT_nn code for each of the elements in the list. 851.8Spooka This option is useful only when building rump kernels for 861.8Spooka NetBSD userspace, and an empty value may be supplied elsewhere. 871.7Spooka 881.7Spooka 891.1Spooka================================================================================ 901.1Spooka 911.6SjustinRumpuser options: 921.6Sjustin 931.6Sjustin RUMPUSER_THREADS 941.6Sjustin 951.6Sjustinvalues: pthread/none/fiber or <undefined> 961.6Sjustindefval: <undefined> 971.6Sjustineffect: Define the way threading is implemented in the rumpuser hypercall 981.6Sjustin implmentation. 991.6Sjustin <undefined> - use default implementation (currently "pthread") 1001.6Sjustin pthread - use pthreads to implement threading 1011.6Sjustin none - do not support kernel threads at all 1021.6Sjustin fiber - user a fiber interface, cooperatively scheduled contexts 1031.6Sjustin 1041.6Sjustin 1051.6Sjustin================================================================================ 1061.6Sjustin 1071.5SpookaPer-component options: 1081.5Spooka 1091.5Spooka RUMP_SYM_NORENAME 1101.5Spooka 1111.5Spookavalues: regexp matching symbol names 1121.5Spookadefval: <undefined> 1131.5Spookaeffect: Causes matching symbols from the component to not be renamed 1141.5Spooka into the rump kernel symbol namespace (rumpns_). This option 1151.5Spooka can only be used in embedded environments where there is full 1161.5Spooka control over the platform's namespace. Conversely, this option 1171.5Spooka cannot be used in kernel components which are not meant to be 1181.5Spooka tied to a specific platform. Note: the value is processed by 1191.5Spooka make and must be appropriately escaped. example: 1201.5Spooka RUMP_SYM_NORENAME=HYPERVISOR_|block$$ 1211.5Spooka will not rename "^HYPERVISOR_" or "^block$" 1221.5Spooka 1231.5Spooka 1241.5Spooka================================================================================ 1251.5Spooka 1261.1Spooka 1271.1SpookaThe rest of the options described in this file are not intended to be 1281.1Spookaset by users, but by the package building rump kernels. 1291.1Spooka 1301.1Spooka 1311.1Spooka RUMP_KERNEL_IS_LIBC 1321.1Spooka 1331.1Spookavalues: defined / not defined 1341.1Spookaeffect: Iff defined, export normal system call symbols from libc. 1351.1Spooka For example, without this option rump_sys_open() is exported. 1361.1Spooka With this option, both open() and rump_sys_open() are exported. 1371.1Spooka This option is meant for building systems where a rump kernel 1381.1Spooka is the only operating system like component. 1391.1Spooka 1401.1Spooka 1411.1Spooka RUMP_LDSCRIPT 1421.1Spooka 1431.4Spookavalues: no/GNU/sun/ctor 1441.1Spookadefval: GNU 1451.1Spookaeffect: Select the linker script to be used for linking rump kernel shared 1461.1Spooka library components. 1471.4Spooka no - do not use a linker script 1481.4Spooka GNU - use a linker script for GNU ld 2.18 and later 1491.4Spooka sun - use a linker script for the Solaris linker 1501.4Spooka ctor - do not use a linker script, make the code 1511.4Spooka generate __attribute__((constructor)) 152