Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump Limit visibility of _RUMPKERNEL to prevent abuse.



details:   https://anonhg.NetBSD.org/src/rev/cafd23e63092
branches:  trunk
changeset: 754762:cafd23e63092
user:      pooka <pooka%NetBSD.org@localhost>
date:      Tue May 11 21:08:07 2010 +0000

description:
Limit visibility of _RUMPKERNEL to prevent abuse.

diffstat:

 sys/rump/Makefile.rump                      |  4 ++--
 sys/rump/librump/rumpkern/Makefile.rumpkern |  9 ++++++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r dfa66a53a65b -r cafd23e63092 sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump    Tue May 11 21:03:41 2010 +0000
+++ b/sys/rump/Makefile.rump    Tue May 11 21:08:07 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.rump,v 1.56 2010/04/26 23:01:53 pooka Exp $
+#      $NetBSD: Makefile.rump,v 1.57 2010/05/11 21:08:07 pooka Exp $
 #
 
 WARNS?=                3       # XXX: src/sys won't compile with -Wsign-compare yet
@@ -10,13 +10,13 @@
 # use rump ABI instead of the NetBSD kernel ABI.
 .ifndef RUMPKMOD
 CPPFLAGS:=     -I${RUMPTOP}/include ${CPPFLAGS}
+CPPFLAGS+=     -D_RUMPKERNEL
 .else
 CPPFLAGS+=     -D_RUMP_NATIVE_ABI
 .endif
 
 CFLAGS+=       -ffreestanding -fno-strict-aliasing
 CWARNFLAGS+=   -Wno-format-zero-length -Wno-pointer-sign
-CPPFLAGS+=     -D_RUMPKERNEL
 CPPFLAGS+=     -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR
 CPPFLAGS+=     -DMAXUSERS=32
 CPPFLAGS+=     -DDIAGNOSTIC
diff -r dfa66a53a65b -r cafd23e63092 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern       Tue May 11 21:03:41 2010 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern       Tue May 11 21:08:07 2010 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.rumpkern,v 1.82 2010/04/30 20:54:17 pooka Exp $
+#      $NetBSD: Makefile.rumpkern,v 1.83 2010/05/11 21:08:07 pooka Exp $
 #
 
 .include "${RUMPTOP}/Makefile.rump"
@@ -68,6 +68,13 @@
 # sys/dev
 SRCS+= clock_subr.c
 
+# Non-kernel ABI gets this for the whole rump build, as opposed to
+# kernel ABI where we need to specifically set it here to get
+# some things like the atomic ops implementation right.
+.ifdef RUMPKMOD
+CPPFLAGS+=     -D_RUMPKERNEL
+.endif
+
 # Flip the comment to the other line if you want to use malloc(3)
 # directly instead of the kernel allocators backed by malloc(3)/mmap(2).
 # Libc malloc is a few percent faster, but doesn't emulate all kernel



Home | Main Index | Thread Index | Old Index