History log of /netbsd-src/tools/libctf/Makefile (Results 1 – 10 of 10)
Revision Date Author Comments
# ad491491 01-Apr-2024 riastradh <riastradh@NetBSD.org>

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
s

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.

show more ...


# 242fdcb1 03-May-2022 jkoshy <jkoshy@NetBSD.org>

Prepare the ground for <elfdefinitions.h> to be used by the 'tools'
build of 'libctf'.


# bf711337 01-May-2018 christos <christos@NetBSD.org>

Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man p

Create a new bsd.hostinit.mk file and put the build definitions for all host
programs there; make all Makefiles that use bsd.hostprog.mk include it.
Namely turn off MKREPRO and don't make lint, man pages, info files etc.
Remove the Makefile.inc files that contained these same settings, and
remove the settings from Makefile.host

show more ...


# b2a8932d 01-May-2018 christos <christos@NetBSD.org>

PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might
not support the necessary options. This is done thusly:

1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles tha

PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might
not support the necessary options. This is done thusly:

1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that
use it and don't include bsd.own.mk.
2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that
include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc
first. This will also allow us to control other tools options from a
single location if we need to.

XXX: pullup-8

show more ...


# eab6a8b5 27-Dec-2015 christos <christos@NetBSD.org>

libelf has moved.


# e3b7b9c4 16-Dec-2012 apb <apb@NetBSD.org>

If you are going to append things to CPPFLAGS and then transfer
the result to HOST_CPPFLAGS later, then also include the value of
HOST_CPPFLAGS in this process. This should fix a problem in which th

If you are going to append things to CPPFLAGS and then transfer
the result to HOST_CPPFLAGS later, then also include the value of
HOST_CPPFLAGS in this process. This should fix a problem in which the
value of HOST_CPPFLAGS set by compat/defs.mk was lost during a build
with MKDTRACE=yes.

XXX: It would probably be better to just use HOST_CPPFLAGS throughout.

show more ...


# e0d2aa9d 02-Dec-2012 apb <apb@NetBSD.org>

Make most things under src/tools use the TOOLDIR version of compat/defs.mk,
instead of the version in the .OBJDIR of tools/compat.


# 0f152b1d 17-Apr-2011 tron <tron@NetBSD.org>

Set "HOSTLIB" before including "bsd.own.mk" to get the destination
directory checks to work properly.


# 59292318 19-Jun-2010 riz <riz@NetBSD.org>

Rename Makefile.disklabel to Makefile.nbincludes, as this file has
been used by more than disklabel for years. New name suggestion from
mrg@ .


# ec591d7f 24-Feb-2010 darran <darran@NetBSD.org>

DTrace: add CTF tools to the toolchain (not built yet).