Commit Graph

68 Commits

Author SHA1 Message Date
pooka 2b493f5e4b Pass linker script with -Wl,-T to avoid clang incompating itself out
without flagging an error.
2012-11-22 21:21:21 +00:00
pooka e4cca1b663 Instead of maintaining an evergrowing list of -U's, leave that up
to an external script.
2012-11-21 17:53:10 +00:00
pooka 49029daa1a Don't duplicate arbitrary chunks of bsd.sys.mk in here (especially
-Wsign-compare, since that doesn't even work with the kernel, and was
just previously masked by -isystem).  Reorder a bit too.
2012-11-21 17:51:42 +00:00
pooka 8d40a1e7f7 Don't unconditionally use the error-silencing magic of -isystem
(as opposed to -I) on every component, only the zfs ones depend on it
to build.  Regular modules might benefit from a similar move.
2012-11-21 17:48:05 +00:00
pooka ee0fcc872d add some -U's for linux builds 2012-11-13 19:12:42 +00:00
joerg c14f2d4ef8 Deal with optional HAVE_GCC. 2012-08-10 16:05:26 +00:00
pooka 232fe594f2 Make it easy to turn -DDIAGNOSTIC off (RUMP_DIAGNOSTIC=no) and -DDEBUG
on (RUMP_DEBUG=yes).
2012-08-05 15:37:39 +00:00
matt 12a3861acb Make rump compile things with -std=gnu99 like the kernel and modules. 2011-05-10 00:33:58 +00:00
matt 658d254929 Define COMPAT_50 to be 1 just like config(8) would be opt_compat_netbsd.h 2011-02-01 01:15:51 +00:00
pooka cd73d116db Support LOCKDEBUG. To use it, compile sys/rump with RUMP_LOCKDEBUG=yes.
requested by martin (sparc64 gdb cannot reliably produce a stack trace)
2011-01-06 11:22:54 +00:00
pooka 6816648ce4 use -isystem where appropriate 2010-12-06 09:12:34 +00:00
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