HomeFreeBSD

sys/conf: Remap paths for reproducibility

Description

sys/conf: Remap paths for reproducibility

As in bsd.lib.mk and bsd.prog.mk, we need to remap paths in the kernel
and in kernel modules when reproducible builds are configured. Add
directives to kern.post.mk and kmod.mk to remap the src, obj and sysroot
dirs.

For the sysroot, we need to pass the value of the SYSROOT variable to
the kernel makefiles, which involves changing Makefile.inc1. In so
doing I reverted a portion of commit 35fb812adfc21; I can't see any harm
in passing the SYSROOT variable down.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50953

(cherry picked from commit eebadc7d8590ff8d38fdbcfd90651c931e713648)

Details

Provenance
markjAuthored on Aug 21 2025, 2:04 PM
Differential Revision
D50953: sys/conf: Remap paths for reproducibility
Parents
rGc89e5c0bfca6: share/mk: Substitute reproducible prefixes in dwarf info
Branches
Unknown
Tags
Unknown