Home | History | Annotate | Download | only in libkvm
History log of /src/lib/libkvm/Makefile
RevisionDateAuthorComments
 1.55  18-Sep-2025  mrg introduce a couple of new turn-off-gcc-warning variables and use them.

GCC 14 has a new annoying calloc() checker that we turn off in a bunch
of places, and there are a few more dangling-pointer issuse that come up,
but seem bogus.
 1.54  03-Aug-2023  rin Revert CC_WNO_USE_AFTER_FREE from Makefile's (thanks uwe@)
 1.53  03-Aug-2023  rin Sprinkle CC_WNO_USE_AFTER_FREE for GCC 12

All of them are blamed for idiom equivalent to:
newbuf = realloc(buf, size);
p = newbuf + (p - buf);
 1.52  01-Apr-2023  rillig libkvm: suppress lint warnings about extern declarations for now

This should be properly fixed by someone who is familiar with libkvm, as
it affects <sys/cpu_data.h> as well.
 1.51  24-Jan-2016  christos mips needs _KMEMUSER for label_t in pcb.h
 1.50  10-Aug-2014  matt MKCOMPAT fixes for when compat MACHINE_CPU != normal MACHINE_CPU
 1.49  21-Mar-2012  matt branches: 1.49.2;
These directories don't handle WARNS=5
 1.48  12-Sep-2011  christos branches: 1.48.2;
add a function to report the name of the file kvm_open{,.files} is using.
 1.47  14-Feb-2011  matt Add -D_KMEMUSER to CPPFLAGS
 1.46  05-Oct-2010  jym branches: 1.46.2;
Import PAE support for kvm(3):
- add kvm_i386pae.c (used for PAE memory translations), and update Makefile
for libkvm build.
- in pdppaddr: pass a flag to indicate PAE mode. Use a bit ignored
by the MMU. Mask address with PG_FRAME to avoid side effects.

Tested with vmstat(1)/netstat(1) to debug core files of PAE and !PAE
kernels. Older kernel dumps will default to native i386 (!PAE) mode.

XXX Currently, savecore(8) will fail to dump a PAE kernel in a !PAE
environment (and reciprocally). So you need to sync and reboot
with a kernel of the same mode as the one that crashed. Once the dump
is successful, this does not matter anymore.
 1.45  25-Oct-2008  mrg look for ${KVM_MACHINE_ARCH} before ${MACHINE_ARCH} and ${MACHINE_CPU}
 1.44  28-May-2007  tls Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.43  10-Feb-2007  ad Add ${NETBSDSRCDIR}/sys to the include path.
 1.42  28-Mar-2003  christos do the exit on lint warnings only on i386 like libc, to avoid the wrath of
the sloppy archs.
 1.41  28-Mar-2003  christos exit on lint warnings.
 1.40  01-Mar-2003  lukem Add workaround for building with ${MACHINE}==sparc64, ${MACHINE_ARCH}==sparc;
symlink the appropriate machine & sparc include directories into the objdir.

XXX: this is necessary until (when?) the sparc Arch Dependent headers
(used by MACHINE_ARCH==sparc) are separated from the sparc Machine
Dependent headeres (used by MACHINE==sparc but not MACHINE==sparc64).
 1.39  18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.38  19-Aug-2002  lukem Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
 1.37  28-Dec-2001  lukem branches: 1.37.2;
* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".

- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.

- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so

2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so

3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed
 1.36  21-May-2001  fredette Added support for sun2 kernel cores.
 1.35  08-Jan-2001  bjh21 Rename kvm_arm32.c to kvm_arm.c, since it's shared between arm32 and arm26.
The Makefile now finds the correct file without help.
 1.34  08-Jan-2001  itojun use MACIHNE_CPU to determine architecture-dependent source code directory.
is use of exists(foo) safe enough?
TODO: many other places to fix
 1.33  04-Jan-2001  itojun sh3 split
 1.32  13-Jun-2000  simonb Document KVM_NO_FILES and kvm_get{proc,argv,envv}2(). Better wording
kindly accepted!

XXX: Need to update distrib lists. Tomorrow...
 1.31  09-May-2000  bjh21 branches: 1.31.2;
Initial commit of arm26 port
 1.30  12-Sep-1999  chs the PMAP_NEW option is gone as the new interface is no longer optional.
 1.29  24-Mar-1999  mrg completely remove Mach VM support. all that is left is the all the
header files as UVM still uses (most of) these.
 1.28  24-Feb-1999  drochner make this build again after the mips->mipse? transition
 1.27  19-Feb-1998  thorpej NetBSD/mips uses new libkvm now.
 1.26  19-Feb-1998  thorpej Sigh, typo.
 1.25  19-Feb-1998  thorpej Simplify test ... MACHINE_ARCH == "mips"
 1.24  18-Feb-1998  perry add -DPMAP_NEW if PMAP_NEW is on in mk.conf
 1.23  18-Feb-1998  thorpej Rewrite _kvm_kvatop() to work with the new crash dump format, and make
the i386 port use libkvm, not libkvm.old.
 1.22  11-Feb-1998  mrg oops, forgot to add support for UVM here.
 1.21  22-Oct-1997  lukem use CPPFLAGS instead of CFLAGS
 1.20  19-Oct-1997  oki branches: 1.20.2;
Oops, fixed edit error at previous commit.
 1.19  19-Oct-1997  oki NetBSD/x68k now use libkvm instead of libkvm.old
 1.18  05-Oct-1997  mark Switch from libkvm.old to libkvm for the arm32 port.
 1.17  23-Jun-1997  veego Use bsd.prog.mk and not bsd.{own,man}.mk
 1.16  23-Jun-1997  veego Add bsd.own.mk for bsd.man.mk.
 1.15  23-Jun-1997  veego Don't include bsd.lib.mk if you don't build a library, just use bsd.man.mk
to build the manpages.
 1.14  23-Jun-1997  mrg move man pages into share/man.
 1.13  21-Mar-1997  gwr typo
 1.12  21-Mar-1997  gwr Build the same libkvm.* on all m68k machines. (Well... except for the
stragglers that still use libkvm.old ) The m68k machines now dispatch
based on the machine name to the appropriate libkvm implementation.
 1.11  18-Mar-1996  thorpej RCS id police.
 1.10  18-Mar-1996  leo Add a manual page for the kvm_dump_* functions.
 1.9  22-Dec-1994  cgd specify man pages the new way.
 1.8  18-Sep-1994  mycroft Merge the m68k files. The code itself should be merged.
 1.7  28-Jul-1994  gwr Add sun3 support (only "live" kernels for now).
 1.6  16-May-1994  chopps branches: 1.6.2;
add support for current m68k based pmaps till they can be "fixed"
 1.5  09-May-1994  cgd m68k-ify the hp300 kvm file; use MACHINE_ARCH to pick files up
 1.4  09-May-1994  cgd clean up import
 1.3  23-Apr-1994  briggs Add mac68k to amiga in looking for cpu040.
 1.2  14-Feb-1994  chopps temporary additional lookup of cpu040 for amiga's until new kvm stuff or new
amiga 040 VM stuff.
 1.1  27-Jan-1994  cgd branches: 1.1.1;
create this in preparation for later.
 1.1.1.1  09-May-1994  cgd new libkvm
 1.6.2.1  29-Jul-1994  cgd from trunk
 1.20.2.1  09-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.31.2.1  23-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.37.2.3  19-Dec-2002  thorpej Sync with HEAD.
 1.37.2.2  23-Apr-2002  nathanw Make libkvm able to cope with a LWPified kernel.

Add a kvm_getlwps() function to retrieve the LWPs of a specific process.
 1.37.2.1  28-Dec-2001  nathanw file Makefile was added on branch nathanw_sa on 2002-04-23 20:10:19 +0000
 1.46.2.1  17-Feb-2011  bouyer Sync with HEAD
 1.48.2.1  17-Apr-2012  yamt sync with head
 1.49.2.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.

RSS XML Feed