Commit Graph

44 Commits

Author SHA1 Message Date
pooka 67cd12f07f Include arch/include/Makefile.inc for some compiler flags. 2009-11-27 13:36:30 +00:00
pooka 59f20ea12d Hmm, in addition to leaving out -lc, -nostdlibs also leaves out
libgcc, and causes problems on some platforms.  Currently there is
no easy way to say "link against libgcc but not against libc", so
just comment out -nostdlibs until a better way is invented.
2009-11-20 12:24:17 +00:00
pooka 1fb57ddbb5 Don't link rump kernel libs against libc. They have no host system
dependencies apart from indirect ones via rumpuser.
2009-11-17 16:17:06 +00:00
pooka 48b3a6f7a3 binutils 2.19 has changed the old behaviour of defining __start_SECTNAME
for orphaned sections to using PROVIDE.  What this means is that
unless a rump component internally references that symbol, it will
not be included in the component shared library, and hence cannot
be referenced when the component is loaded.  Add a workaround which
works both with 2.16 and 2.19: force a reference to the __start
symbol internally and hence retain it in the resulting library.
2009-09-13 22:51:41 +00:00
pooka 725cff3f33 kernel code needs -Wno-format-zero-length 2009-09-08 20:24:08 +00:00
pooka 7b557eda2c Always define __NetBSD__ (for builds on non-NetBSD) 2009-09-07 13:02:37 +00:00
pooka 3b98424735 define DEBUGPRINT 2009-05-03 16:53:54 +00:00
pooka 13bf8de01d prettyprint long line, no functional change 2009-04-26 20:45:37 +00:00
perry 0e8e3df5ff More reproducible build fixes:
1) invoke objcopy with --preserve-dates or it will update all the
   dates in the .a file to the present date.
2) add an invocation of ar-as-ranlib or the object file index ends up
   with the date in it. (it might also end up with an incorrect
   index.)
2009-04-01 17:51:12 +00:00
pooka 0f732e9cfb remove RANLIB too. pointed out by perry. 2009-03-21 04:59:08 +00:00
pooka 83102249b5 Reflect the change to archivebuild in bsd.lib.mk rev 1.296 for
deterministic builds, as hinted by perry.
2009-03-19 12:01:50 +00:00
lukem 342bcd3c5c Drop to WARNS?=3 as src/sys doesn't compile with -Wsign-compare yet 2009-02-12 13:23:17 +00:00
pooka 2751aa1fdb * enable COMPAT_50 (we need a better compat model here, but this is
enough for now)
* _RUMPKERNEL is not going anywhere anymore, so adjust comment
2009-01-23 19:14:30 +00:00
he fddc3457b2 Change the use of formally undocumented features, which have now been
made to fail.  Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
2009-01-18 20:42:11 +00:00
pooka 574c2ab1b1 Do rump kernel symbol protection for vax. All archs support it now. 2009-01-14 23:22:09 +00:00
pooka ceca66166d * Add adapted version of the userspace atomic_cas ops for platforms
lacking special instructions.  We always use the spinlocked version
  (could use RAS on UP NetBSD host, but it's not portable).
* Add platform-based symbol quirk tables for selectively not renaming
  toolchain symbols for some platforms.  Although, this should really
  depend on the (toolchain,platform)-tuple and not just the platform.

This allows arm, hppa, mips and sh3 to build succesfully with an
isolated rump kernel namespace.  ... now, one arch remains: vax.
you must compile vax.  then, only then will you MI be.
2009-01-12 02:22:55 +00:00
pooka 893db2f6ab Treat all of ^__ as compiler namespace and do not rename those
symbols.  This fixes e.g. fortify and sh3 millicode issues.  This
is still not perfect, however, since e.g. the MIPS _gp_disp is not
in ^__.

XXX: we provide a few ^__ symbols in the kernel, but those can be
easily renamed.  The harder problem is how to keep the kernel clean
of those afterwards.
2009-01-11 12:55:37 +00:00
pooka c0284edf66 * sparc supports rump kernel symbol rename
* plonk vax in here since it has issues with rename
2009-01-10 23:38:40 +00:00
pooka f326c3106f Disable symbol renaming for now on arm, mips, sh3 and sparc to
allow them to build.  Some libgcc symbols are being renamed also,
plus not all atomic operations are provided by libkern on these
archs.
2009-01-10 20:19:43 +00:00
pooka f72740e2d9 Add Makefile.rump to DPSRCS. Should solve issues with UPDATE=1 builds. 2009-01-08 20:00:12 +00:00
pooka ed610ecd69 Rename symbols in rump kernel libraries to always belong to a "rump"
symbol namespace.  This has several implications:
  * no symbols are accidentally linked against host platform libraries
  * all host platform access is done via rumpuser, and hence the
    portability of rump is now well defined
  * functionality such as proplib can now exist within the rump virtual
    kernel and the application using it

Thanks to uwe for originally suggesting the bulk renaming approach
over a pint of what I believe was very crisp, curious and untypical
stout.  It had an almost acidic characteristic with fruity notes
and lacking dark and roasted flavours.

And thanks to lukem for pointing me in the right direction with make.
2009-01-08 18:42:42 +00:00
pooka 72858b67bf Define -DMODULAR in Makefile.rump instead of the sys/rump/librump
Makefile.inc so that it gets picked up by UPDATE=1
2009-01-02 11:13:38 +00:00
pooka b5d970336b disable strict aliasing to mirror kernel build flags 2009-01-01 22:16:35 +00:00
pooka 3945d47397 Purge multiple kernel opt files. 2009-01-01 19:43:57 +00:00
pooka dfa6b36e0e Move list of rump-uses-kmod archs to bsd.own.mk for wider consumption. 2008-12-30 21:31:10 +00:00
pooka 3b189207d8 Switch amd64 rumps to the kernel ABI. 2008-12-30 19:05:40 +00:00
pooka f8829b7dcb Switch i386 away from rump/include/machine. This means that rump
on i386 now uses the native kernel ABI.  This in turn means that
rump modules and kernel modules are binary equivalent and can be
used interchangeably.
2008-12-29 22:16:15 +00:00
pooka b03bd9bf49 We are conseptually a module, so -D_MODULE. Group CPPFLAGS better. 2008-12-29 18:53:57 +00:00
pooka b1e593bee5 Pick PPC_OEA over PPC_IBM4XX. I've decided I like it more.
(plus it hopefully builds without source changes)
2008-12-16 23:49:48 +00:00
pooka abe4c2aeb6 liberate trailing whitespace 2008-12-16 23:17:17 +00:00
pooka 994144641d -Isys/arch is used in kernel builds 2008-12-16 23:16:46 +00:00
pooka 316be31a2e Instead of punishing all archs for a fake vmparam.h, punish only
evbppc for its insolence and pick a ppc cpu family at random in
Makefile.rump.
2008-12-08 12:57:33 +00:00
pooka c453d67e49 Compile all rump kernel portions with -DMULTIPROCESSOR. 2008-10-09 13:40:38 +00:00
pooka 4b68af9947 Prevent amd64 compiler flag -mcmodel=kernel for rump kernel code.
This allows to compile rump libraries as shared libraries also on mad64.

Problem spotted by Greg Oster.  I guess his build broke or something ...
2008-07-29 20:18:25 +00:00
pooka bdf6e0b034 Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
  * install relevant headers into /usr/include/rump
  * build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
    from src/lib and install as librumpuser and librump, respectively
    + this retains the ability to test a librump build with just the
      kernel sources at hand
  * move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
    for general consumption, they are not kernel-space dwellers anyway
  * build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
  * add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
  * build and install userspace kernel file system daemons if MKPUFFS=yes
    is spexified
  * retire fsconsole for now, it will make a comeback with an actually
    implemented version shortly
2008-07-29 13:17:40 +00:00
pooka 1d89d2370c enable DIAGNOSTIC 2008-07-18 16:20:03 +00:00
ad fdce452b03 Turn off DIAGNOSTIC so it builds. 2008-05-31 19:28:36 +00:00
lukem 66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
pooka 2b1b5d29b8 Use namei() etc. from kernel sources instead of a reimplementation.
To accommodate, give the rootvnode its own vnode op vector with a
simple lookup operation.  This is used for looking up the file
system's device vnode instead of doing that directly in a homesmoked
namei().
2008-01-24 22:41:07 +00:00
pooka 1cf445da3e Don't play rename & typecast games with kauth_cred_t, but rather
declare the type in rump.h only if necessary with the help of ifdef
magic.
2007-08-25 10:22:31 +00:00
pooka cfd4dc8f38 Wrap malloc() so that we catch the kernel arguments (namely M_ZERO)
properly.  It's fairly amusing that this wasn't noticed until now.
2007-08-15 22:13:15 +00:00
pooka 22ca3a326a Compile kernel stuff with DIAGNOSTIC. 2007-08-07 21:33:13 +00:00
pooka f5e5e38069 -I${NETBSDSRCDIR}/common/include 2007-08-07 10:30:39 +00:00
pooka daafee8742 Introduce RUMPs - Runnable Userspace Meta-Programs
/sys/rump contains programs which run unmodified kernel code in an
emulated userspace environment.  The kernel environment is provided
by librump.  Currently supported are a number of file systems,
which by using puffs integrate seamlessly into the system and
provide a similar user experience to if the code was running as
part of the kernel.  Potential future rumpification targets include
for example parts of the networking stack and some device drivers.

This work was supported by Google Summer of Code 2007.
2007-08-05 22:28:00 +00:00