Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154299235
D52959.id168655.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D52959.id168655.diff
View Options
diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5
--- a/share/man/man5/src.conf.5
+++ b/share/man/man5/src.conf.5
@@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
-.Dd December 21, 2025
+.Dd December 28, 2025
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -1590,6 +1590,13 @@
Exclude build metadata (such as the build time, user, or host)
from the kernel, boot loaders, and uname output, so that builds produce
bit-for-bit identical output.
+.It Va WITH_REPRODUCIBLE_PATHS
+Modify the paths encoded in binary artifacts to be standard path
+
+Normaly, the actual path is encoded in the binary. However, this makes the build
+differ depending on the path it was built from. With this option enabled, the
+paths recorded are /usr/src, regardless of the actual path. With this option
+disabled, the actual paths are recorded.
.It Va WITHOUT_RESCUE
Do not build
.Xr rescue 8 .
diff --git a/share/mk/bsd.debug.mk b/share/mk/bsd.debug.mk
--- a/share/mk/bsd.debug.mk
+++ b/share/mk/bsd.debug.mk
@@ -16,7 +16,7 @@
# If reproducible build mode is enabled, map the root of the source
# directory to /usr/src and the root of the object directory to
# /usr/obj.
-.if ${MK_REPRODUCIBLE_BUILD} != "no" && !defined(DEBUG_PREFIX)
+.if ${MK_REPRODUCIBLE_PATHS} != "no" && !defined(DEBUG_PREFIX)
.if defined(SRCTOP)
DEBUG_PREFIX+= ${SRCTOP:S,/$,,}=/usr/src
.endif
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -217,6 +217,7 @@
MALLOC_PRODUCTION \
OFED_EXTRA \
OPENLDAP \
+ REPRODUCIBLE_PATHS \
RPCBIND_WARMSTART_SUPPORT \
SORT_THREADS \
ZONEINFO_LEAPSECONDS_SUPPORT \
diff --git a/sys/conf/kern.opts.mk b/sys/conf/kern.opts.mk
--- a/sys/conf/kern.opts.mk
+++ b/sys/conf/kern.opts.mk
@@ -56,6 +56,7 @@
KERNEL_RETPOLINE \
RATELIMIT \
REPRODUCIBLE_BUILD \
+ REPRODUCIBLE_PATHS \
VERIEXEC
# Some options are totally broken on some architectures. We disable them. If you
diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk
--- a/sys/conf/kern.post.mk
+++ b/sys/conf/kern.post.mk
@@ -372,7 +372,7 @@
_ILINKS+= i386
.endif
-.if ${MK_REPRODUCIBLE_BUILD} != "no"
+.if ${MK_REPRODUCIBLE_PATHS} != "no"
PREFIX_SYSDIR=/usr/src/sys
PREFIX_OBJDIR=/usr/obj/usr/src/${MACHINE}.${MACHINE_CPUARCH}/sys/${KERN_IDENT}
CFLAGS+= -ffile-prefix-map=${SYSDIR}=${PREFIX_SYSDIR}
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -303,7 +303,7 @@
beforedepend: ${_ILINKS}
beforebuild: ${_ILINKS}
-.if ${MK_REPRODUCIBLE_BUILD} != "no"
+.if ${MK_REPRODUCIBLE_PATHS} != "no"
PREFIX_SYSDIR=/usr/src/sys
CFLAGS+= -ffile-prefix-map=${SYSDIR}=${PREFIX_SYSDIR}
.if defined(KERNBUILDDIR)
diff --git a/tools/build/options/WITH_REPRODUCIBLE_PATHS b/tools/build/options/WITH_REPRODUCIBLE_PATHS
new file mode 100644
--- /dev/null
+++ b/tools/build/options/WITH_REPRODUCIBLE_PATHS
@@ -0,0 +1,6 @@
+Modify the paths encoded in binary artifacts to be standard path
+
+Normaly, the actual path is encoded in the binary. However, this makes the build
+differ depending on the path it was built from. With this option enabled, the
+paths recorded are /usr/src, regardless of the actual path. With this option
+disabled, the actual paths are recorded.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 28, 4:51 PM (8 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32292949
Default Alt Text
D52959.id168655.diff (3 KB)
Attached To
Mode
D52959: kernel: MK_REPRODUCIBLE_PATHS for full paths vs /usr/src
Attached
Detach File
Event Timeline
Log In to Comment