Home | History | Annotate | Download | only in kdump
History log of /src/usr.bin/kdump/Makefile.ioctl-c
RevisionDateAuthorComments
 1.40  01-Apr-2024  riastradh elftoolchain: Be consistent about which ELF header files we use.

1. For tools that use elftoolchain: always use elftoolchain's
elfdefinitions.h. Don't even think about looking at the host's
sys/exec_elf.h, which makes no sense and should never happen.

(ELF tools that don't use elftoolchain, like m68k-elf2coff,
continue to use nbincludes/sys/exec_elf.h. But no more nbincludes
hacks in elftoolchain.)

2. For kernel components (solaris, zfs, dtrace): always use
sys/exec_elf.h, even in Solaris components via sys/elf.h.
elfdefinitions.h is not wired up in the kernel build at all.

3. For most userland components that involve libelf: use
elfdefinitions.h via libelf header files (libelf.h, gelf.h).

libdtrace in particular requires _all_ R_* reloc type definitions,
but sys/exec_elf.h brings in only the _current machine's_ R_*
reloc type definitions. (While here: Use uintptr_t instead of
Elf_Addr for pointer-to-integer cast, since Elf_Addr is MD and
provided only by sys/exec_elf.h, not by elfdefinitions.h.)

And most userland components using libelf don't rely on any
properties of the current machine from sys/exec_elf.h, so they can
use libelf's elfdefinition.h.

Exceptions:

- dtrace drti.c relies on link.h -> link_elf.h -> sys/exec_elf.h,
but it also relies on sys/dtrace.h -> sys/elf.h ->
elfdefinitions.h like other userland components using sys/elf.h.

- kdump-ioctl.c uses sys/exec_elf.h directly and sys/dtrace.h ->
sys/elf.h -> elfdefinitions like other userland components using
sys/elf.h.

- t_ptrace_wait.c (via t_ptrace_core_wait.h) uses libelf to parse
core files, but relies on sys/exec_elf.h for struct
netbsd_elfcore_procinfo.

None of these exceptions needs all R_* reloc type definitions, so
as a workaround, we can just suppress libelf's elfdefinitions.h by
defining _SYS_ELFDEFINITIONS_H_ and use sys/exec_elf.h in these
exceptions.

And undo the whole BUILTIN_ELF_HEADERS mistake. This was:

- half bogus workarounds for missing build_install dependencies in
tools/Makefile, which are no longer missing now, and
- half futile attempt to use src/sys/sys/exec_elf.h via nbincludes in
tools involving libelf instead of libelf's elfdefinitions.h, which
collides.

Longer-term, we may wish to unify sys/exec_elf.h and libelf's
elfdefinitions.h, so we don't have to play these games.

But at least now the games are limited to three .c files (one of
which is generated by Makefile.ioctl-c), rather than haphazardly
applied tree-wide by monstrous kludges in widely used .h files with
broken hackarounds to get the tools build lurching to completion.
 1.39  12-Nov-2022  mrg updates for libdrm 2.4.114.

unfortunately, the i915 ioctls are no longer handled by kdump/ktruss
as the new one conflicts with base. this needs a clean build in these
dirs (and rescue). the radeon ioctls have been enabled instead.
 1.38  29-Sep-2018  rmind NPF: Major rework -- migrate NPF to the libnv library.
- This conversion significantly simplifies the code and moves NPF to
a binary serialisation format (replacing the XML-like format).
- Fix some memory/reference leaks and possibly use-after-free bugs.
- Bump NPF_VERSION as this change makes libnpf incompatible with the
previous versions. Also, different serialisation format means NPF
connection/config saving and loading is not compatible with the
previous versions either.

Thanks to christos@ for extra testing.
 1.37  12-Jun-2018  christos branches: 1.37.2;
remove extra quotes.
 1.36  12-Jun-2018  christos - instead of hard-coding the include paths in mkioctls, pass them in
from the Makefile so that they are consistent.
- do more sed so that destination paths are not hard-coded inside #include
statements.
 1.35  28-May-2018  chs merge a new version of the CDDL dtrace and ZFS code.
this changes the upstream vendor from OpenSolaris to FreeBSD,
and this version is based on FreeBSD svn r315983.

in addition to the 10 years of improvements from upstream,
this version also has these NetBSD-specific enhancements:
- dtrace FBT probes can now be placed in kernel modules.
- ZFS now supports mmap().
 1.34  05-Nov-2017  christos branches: 1.34.2;
- fix "obsolete" skipping to handle obsolete entries that contain other
variables
- skip files particular to other xserver versions than ours.

XXX: How does this build in the build farm?
 1.33  18-Aug-2016  mrg don't hide _DEV_IC_BT8XX_H_ inside DTRACE.
 1.32  01-Apr-2016  knakahara ' != " so make the condition actually work. (same as r1.30)
 1.31  06-Feb-2016  joerg METEORGSIGNAL and METEORSFMT overlap with dtrace, prefer the latter.
 1.30  02-Nov-2015  joerg ' != " so make the condition actually work.
 1.29  26-Sep-2015  christos Add dtrace ioctls
 1.28  07-Feb-2015  christos Add QXL, re-enable I915
 1.27  07-Feb-2015  martin Drop i915, it still causes duplicate case statements
(DRM_IOCTL_QXL_UPDATE_AREA == DRM_IOCTL_I915_BATCHBUFFER)
 1.26  06-Feb-2015  christos Extend the list of the headers processed to generate symbolic ioctls to
the X sets, and include the DRM ioctls. Unfortunately the DRM ioctls for
different cards overlap, so until I write some code to merge them, only
enable one (currently the i915).
 1.25  06-Apr-2013  uebayasi * Don't re-generate kdump-ioctl.c during install.
* Don't expand hundreds of *.h paths into a variable and command-line in !=.
Lazily handle it the glob instead.
 1.24  04-Apr-2013  dsl Extract a base list of .h files from the set lists instead of looking
at the current contents of ${DESTDIR}.
Ignore missing files and also depend on the set lists themselves.
Should stop the build breaking here if there are extra files in DESTDIR (etc).
NB: The order of the .h files matters somewhat. Probably works by luck.
 1.23  25-Oct-2008  apb branches: 1.23.4; 1.23.20; 1.23.26;
Pass SED=${TOOL_SED:Q} in the environment to scripts run during the build.
 1.22  19-Oct-2008  apb Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
 1.21  23-Mar-2008  christos little cleanups.
 1.20  17-Feb-2008  bouyer Install xenio.h and xenio3.h in /usr/include/xen, for the benefit
of xentools3.

XXX ignore those in Makefile.ioctl-c, they don't compile properly outside
of the Xen context and the ioctls from xenio.h conflicts with
soundcard.h
 1.19  16-Feb-2008  matt Add ${PROG}-ioctl.c to DPSRCS
 1.18  27-Aug-2006  christos branches: 1.18.2; 1.18.4; 1.18.8;
pick up ioctls from other devices too.
 1.17  02-Jun-2006  christos PR/33627: Keiichi Shima: typo in Makefile.ioctl-c in kdump directory
s/RW/WR/
 1.16  10-Jul-2004  tron branches: 1.16.6;
Add prefix "${PROG}-" to filename of automatically created list of
ioctl names. This makes sure that each program is built with its own
copy even if object directories are not used. This avoids build
failures when two or more make jobs are used in parallel.
 1.15  07-Jul-2004  tron Don't scan include files in "includes" target because they might not be
in the destination directory yet.
 1.14  23-Apr-2004  hannken Don't invoke the egrep for cleandir and obj targets. Needed for build.sh.
Use ".if !make()" instead of ".if !target()".
 1.13  23-Apr-2004  hannken Undo last commit -- doesn't work.
 1.12  23-Apr-2004  hannken Don't invoke the egrep for cleandir and obj targets. Needed for build.sh.
 1.11  22-Apr-2004  christos Instead of pussy-footing around and grabbing a few of the ioctl's here and
there randomly, grab all the ioctls from the include files.
Read the XXX's in mkioctls about problems with our header files.
 1.10  21-Oct-2003  lukem Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.
 1.9  19-Oct-2003  lukem support MAKEVERBOSE and use ${HOST_SH}
 1.8  27-Aug-2003  thorpej * Make it a little easier to add new "ioctl defns are in these files".
* Add the ability to decode the cryptodev ioctls.
 1.7  18-Apr-2003  christos Don't invoke the grep for cleandir and obj targets. Suggested by
Juergen Hannken-Illjes
 1.6  13-Apr-2003  christos PR/21117: Robert Elz: Makefile-ioctl.c mishandles dependencies
 1.5  19-Sep-2002  lukem use NETBSDSRCDIR as appropriate
 1.4  25-Sep-2001  mycroft Quotes around ${CC}...
 1.3  23-Sep-2001  jdolecek set CC and DESTDIR for mkioctls accordingly
patch by Chris Jepeway via tech-userlevel.
 1.2  27-Jul-2000  mrg mark the installed ioctl.h & ioctl_compat.h PRECIOUS; if mkioctls fails, don't delete them!
 1.1  12-Jul-1999  mrg - build with obj dirs.
- use .PATH not broken links
- share the make fragment to build "ioctl.c"
- general clean up, RCSID, etc.

this is all happy now AFAICT.
 1.16.6.1  19-Jun-2006  chap Sync with head.
 1.18.8.1  23-Mar-2008  matt sync with HEAD
 1.18.4.1  03-Jun-2008  skrll Sync with netbsd-4.
 1.18.2.1  23-Mar-2008  jdc Pull up revisions (requested by bouyer in ticket #1087):
src/distrib/sets/lists/comp/md.i386 1.104
src/sys/arch/i386/Makefile 1.33
src/sys/arch/xen/include/Makefile 1.3
src/usr.bin/kdump/Makefile.ioctl-c 1.20

Install xenio.h and xenio3.h in /usr/include/xen, for the benefit
of xentools3.

XXX ignore those in Makefile.ioctl-c, they don't compile properly outside
of the Xen context and the ioctls from xenio.h conflicts with
soundcard.h
 1.23.26.1  23-Jun-2013  tls resync from head
 1.23.20.1  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.4.2  25-Oct-2008  apb Pass SED=${TOOL_SED:Q} in the environment to scripts run during the build.
 1.23.4.1  25-Oct-2008  apb file Makefile.ioctl-c was added on branch christos-time_t on 2008-10-25 22:23:56 +0000
 1.34.2.2  30-Sep-2018  pgoyette Ssync with HEAD
 1.34.2.1  25-Jun-2018  pgoyette Sync with HEAD
 1.37.2.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed