From 3e90dba8bce07b0704f8438b96b79cf8b15714ac Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 19 Oct 2026 11:18:02 +0200 Subject: [PATCH] Make dependency builds independent of the temporary directory path libfuse is built with debug info, so the random mktemp path ends up in libfuse3.a and, through static linking, in the runtime's debug info, build ID and .gnu_debuglink CRC. Two builds of the same build environment therefore yield different runtime binaries. Map the path to a fixed one using -ffile-prefix-map. With this change, separate builds produce bit-identical runtime and .debug files (tested for x86_64 and i686). Refs #133 --- scripts/common/install-dependencies.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/common/install-dependencies.sh b/scripts/common/install-dependencies.sh index 0e21cdb..9716cb8 100755 --- a/scripts/common/install-dependencies.sh +++ b/scripts/common/install-dependencies.sh @@ -18,6 +18,9 @@ this_dir="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")" cd "$tmpdir" +# keep the random tmpdir path out of the debug info, it would end up in the runtime's build ID +prefix_map_flags="-ffile-prefix-map=$tmpdir=." + wget https://github.com/libfuse/libfuse/releases/download/fuse-3.15.0/fuse-3.15.0.tar.xz echo "70589cfd5e1cff7ccd6ac91c86c01be340b227285c5e200baa284e401eea2ca0 fuse-3.15.0.tar.xz" | sha256sum -c - tar xf fuse-3.*.tar.xz @@ -25,13 +28,13 @@ pushd fuse-3*/ patch -p1 < "$this_dir"/../../patches/libfuse/mount.c.diff mkdir build cd build -meson setup --prefix=/usr .. +CFLAGS="$prefix_map_flags" meson setup --prefix=/usr .. meson configure --default-library static ninja -v install popd # Minimize binary size -export CFLAGS="-ffunction-sections -fdata-sections -Os" +export CFLAGS="-ffunction-sections -fdata-sections -Os $prefix_map_flags" wget "https://github.com/vasi/squashfuse/archive/0.5.2.tar.gz" echo "db0238c5981dabbd80ee09ae15387f390091668ca060a7bc38047912491443d3 0.5.2.tar.gz" | sha256sum -c -