#
4f81c42f |
| 21-Aug-2025 |
Mark Johnston <markj@FreeBSD.org> |
share/mk: Substitute reproducible prefixes in dwarf info
Ensure that worlds/releases built from different source paths are reproducible. Currently they are not since src and obj paths are embedded
share/mk: Substitute reproducible prefixes in dwarf info
Ensure that worlds/releases built from different source paths are reproducible. Currently they are not since src and obj paths are embedded in DWARF info. There are some uses of __FILE__ in the src tree as well, and they are similarly handled by this change.
Use /usr/src and /usr/obj as the canonical src and obj paths when WITH_REPRODUCIBLE_BUILD is defined. Define a DEBUG_PREFIX variable which is used to ask the compiler to substitute paths in output files using -ffile-prefix-map.
Compat builds (i.e., lib32) complicate things since they override OBJROOT to point to obj-${compat} but still refer to headers from the native objroot (e.g., llvm headers).
MFC after: 1 month Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D50951
show more ...
|
#
3a239e46 |
| 21-Aug-2025 |
Mark Johnston <markj@FreeBSD.org> |
share/mk: Deduplicate some handling of debug info
bsd.prog.mk and bsd.lib.mk contain a bunch of duplicated logic used to handle DEBUG_FLAGS and standalone debug file info (enabled by MK_DEBUG_FILES)
share/mk: Deduplicate some handling of debug info
bsd.prog.mk and bsd.lib.mk contain a bunch of duplicated logic used to handle DEBUG_FLAGS and standalone debug file info (enabled by MK_DEBUG_FILES). In anticipation of adding more duplicated logic, let's try factoring it out into a separate bsd.debug.mk first.
bsd.debug.mk now handles the following: - MK_ASSERT_DEBUG - installation rules for debug files (the consumer has to set DEBUGFILE) - updating CFLAGS and CXXFLAGS based on DEBUG_FLAGS - optionally stripping installed files
No functional change intended.
Reviewed by: bdrewery Sponsored by: The FreeBSD Foundation Sponsored by: Klara, Inc. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D51805
show more ...
|