Commit Graph

57 Commits

Author SHA1 Message Date
pooka
d3280f90bc Limit visibility of _RUMPKERNEL to prevent abuse. 2010-05-11 21:08:07 +00:00
pooka
560d308a49 Give a cpp hint if the native kernel abi is supported. 2010-04-26 23:01:53 +00:00
mrg
98a4c48317 apply a patch from dennis fergusson:
fix the powerpc64 quirk handling by introducing a prefix quirk and
using it as appropriate.  fix the (postfix) quirk.

now rump and powerpc64 get along nicely.
2010-03-28 04:29:34 +00:00
mrg
eeea16608f add + _SYMQUIRK='|\.(rump|RUMP)' for powerpc64, as recommended by pooka.
it gets rid of many of the warnings trying to link rump_cd9960, but
there are a bunch remaining.  atomic ops seem missing, and some ktrace
points.
2010-03-22 05:39:00 +00:00
pooka
40bb87a667 Move make snippets for use with config(1) ioconf functionality from
rump into share/mk.  This is to make it useful for all kernel
builders.

Note: we have waaay too many weird and wonderful ways of making
kernel code (monolithic kernel, modules, rump).  There should be
only one way to build kernel code instead of a maze of twisty little
.mk files, all not quite alike.  When that is fixed, this snippet can go
into the more generic .mk file.
2010-03-21 06:55:44 +00:00
pooka
89e1ba2569 Rename IOCONFIG to IOCONF. It matches the config(1) keyword and
aligns better in Makefiles.
2010-03-01 15:41:15 +00:00
pooka
35257440bd Invert inverted comment and verbosify it. 2010-02-17 13:28:40 +00:00
pooka
643ba90bf0 Globally define -Wno-pointer-sign, as it has become a pointless
exercise of "add it to every Makefile individually".

XXX: should autosynchronize with the rest of the kernel buildflags
in sys/conf/Makefile.kern.inc.
2010-02-16 20:42:44 +00:00
pooka
a1e25c6e46 IOCONFIG comes from .CURDIR 2010-02-09 16:16:26 +00:00
pooka
b68d6b80c0 add a rule for locators.h too 2010-02-03 21:15:39 +00:00
pooka
61cce04cfe If IOCONFIG is defined, autogenerate ioconf.c and locators.h
from ${IOCONFIG}.
2010-02-03 21:11:24 +00:00
pooka
5412e3f097 Make (no pun intended) it possible to perform component symbol
protection from a shell prompt with the command line:

    make -f /sys/rump/Makefile RUMP_SYMREN=module.kobj

This is benefitial especially on i386, where rump ABI matches the
kernel ABI (sans the renaming isolation).  In the above example
module.kobj can then be loaded in a rump kernel either statically
at link-time simply by giving module.kobj as an object to the
linker, or dynamically at runtime by calling rump_sys_modctl(MODCTL_LOAD).
2010-01-31 00:38:36 +00:00
pooka
fbc989bbef Use linker script to make __start/stop_link_set_modules be present
in libs built with binutils >=2.19.  This is a less error-prone
method than the previous where components had to be tagged in the
Makefile as modules (and if they weren't, things broke.  and vice
versa).
2009-12-12 17:10:19 +00:00
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