README.compileopts revision 1.15
11.15Shannken	$NetBSD: README.compileopts,v 1.15 2022/05/03 08:34:00 hannken 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.13Spookavalues:	<defined> / <undefined>
221.13Spookadefval:	<undefined>
231.1Spookaeffect:	Iff defined, build with -DDEBUG.
241.1Spooka
251.1Spooka
261.1Spooka    RUMP_LOCKDEBUG
271.1Spooka
281.13Spookavalues:	<defined> / <undefined>
291.13Spookadefval:	<undefined>
301.1Spookaeffect:	Iff defined, build with -DLOCKDEBUG.
311.1Spooka
321.1Spooka
331.15Shannken    RUMP_VNODE_LOCKDEBUG
341.15Shannken
351.15Shannkenvalues:	<defined> / <undefined>
361.15Shannkendefval:	<undefined>
371.15Shannkeneffect:	Iff defined, build with -DVNODE_LOCKDEBUG.
381.15Shannken
391.15Shannken
401.1Spooka    RUMP_KTRACE
411.1Spooka
421.1Spookavalues:	yes|no
431.1Spookadefval:	yes
441.1Spookaeffect:	Iff "yes", build with -DKTRACE.
451.1Spooka
461.1Spooka
471.1Spooka    RUMP_LOCKS_UP
481.1Spooka
491.1Spookavalues: yes|no
501.1Spookadefval:	no
511.1Spookaeffect: If "yes", build rump kernel with uniprocess-optimized locking.
521.1Spooka	An implication of this is that RUMP_NCPU==1 is required at
531.1Spooka	runtime.  If "no", build with multiprocessor-capable locking.
541.1Spooka
551.1Spooka
561.1Spooka    RUMP_VIRTIF
571.1Spooka
581.1Spookavalues:	yes|no
591.1Spookadefval:	yes
601.1Spookaeffect:	Iff "yes", build the virt(4) network interface.  Turning this
611.1Spooka	off may be necessary on systems that lack the necessary headers,
621.1Spooka	e.g. musl libc based Linux.
631.1Spooka
641.1Spooka
651.3Spooka    RUMP_CURLWP
661.3Spooka
671.3Spookavalues: hypercall/__thread/register or <undefined>
681.3Spookadefval: <undefined>
691.3Spookaeffect: Control how curlwp is obtained in a rump kernel.  This is
701.3Spooka	a very frequently accessed thread-local variable, and optimizing
711.3Spooka	access has a significant performance impact.  Note that all
721.3Spooka	options are not available on hosts/machine architectures.
731.3Spooka	<undefined> - use default implementation (currently "hypercall")
741.3Spooka	hypercall   - use a hypercall to fetch the value
751.3Spooka	__thread    - use the __thread feature to fetch value via TLS
761.3Spooka	register    - use a dedicated register (implies -ffixed)
771.3Spooka
781.3Spooka
791.8Spooka    RUMP_NBCOMPAT
801.7Spooka
811.11Spookavalues: comma-separated list of releases; e.g. "60,70";
821.11Spooka	or "all" or "default" or "none".  Currently default == all (but
831.11Spooka	might not be so in the future)
841.9Spookadefval:	all
851.8Spookaeffect:	Builds NetBSD COMPAT_nn code for each of the elements in the list.
861.8Spooka	This option is useful only when building rump kernels for
871.8Spooka	NetBSD userspace, and an empty value may be supplied elsewhere.
881.7Spooka
891.7Spooka
901.1Spooka================================================================================
911.1Spooka
921.5SpookaPer-component options:
931.5Spooka
941.5Spooka    RUMP_SYM_NORENAME
951.5Spooka
961.5Spookavalues: regexp matching symbol names
971.5Spookadefval: <undefined>
981.5Spookaeffect: Causes matching symbols from the component to not be renamed
991.5Spooka	into the rump kernel symbol namespace (rumpns_).  This option
1001.5Spooka	can only be used in embedded environments where there is full
1011.5Spooka	control over the platform's namespace.	Conversely, this option
1021.5Spooka	cannot be used in kernel components which are not meant to be
1031.5Spooka	tied to a specific platform.  Note: the value is processed by
1041.5Spooka	make and must be appropriately escaped.  example:
1051.5Spooka	RUMP_SYM_NORENAME=HYPERVISOR_|block$$
1061.5Spooka	will not rename "^HYPERVISOR_" or "^block$"
1071.5Spooka
1081.5Spooka
1091.5Spooka================================================================================
1101.5Spooka
1111.1Spooka
1121.1SpookaThe rest of the options described in this file are not intended to be
1131.1Spookaset by users, but by the package building rump kernels.
1141.1Spooka
1151.1Spooka
1161.1Spooka    RUMP_KERNEL_IS_LIBC
1171.1Spooka
1181.1Spookavalues:	defined / not defined
1191.1Spookaeffect: Iff defined, export normal system call symbols from libc.
1201.1Spooka	For example, without this option rump_sys_open() is exported.
1211.1Spooka	With this option, both open() and rump_sys_open() are exported.
1221.1Spooka	This option is meant for building systems where a rump kernel
1231.1Spooka	is the only operating system like component.
1241.1Spooka
1251.1Spooka
1261.1Spooka    RUMP_LDSCRIPT
1271.1Spooka
1281.4Spookavalues: no/GNU/sun/ctor
1291.1Spookadefval: GNU
1301.1Spookaeffect: Select the linker script to be used for linking rump kernel shared
1311.1Spooka	library components.
1321.4Spooka	no	- do not use a linker script
1331.4Spooka	GNU	- use a linker script for GNU ld 2.18 and later
1341.4Spooka	sun	- use a linker script for the Solaris linker
1351.4Spooka	ctor	- do not use a linker script, make the code
1361.4Spooka		  generate __attribute__((constructor))
137