Skip to content

Commit 1d4d711

Browse files
achow101fanquake
authored andcommitted
guix: Map all guix store prefixes to /usr
Without ffile-prefix-map, the debug symbols will contain paths for the guix store which will include the hashes of each package. However, the hash for the same package will differ when on different architectures. In order to be reproducible regardless of the architecture used to build the package, map all guix store prefixes to something fixed, e.g. /usr.
1 parent ba29911 commit 1d4d711

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

contrib/guix/libexec/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disab
223223

224224
# CFLAGS
225225
HOST_CFLAGS="-O2 -g"
226+
HOST_CFLAGS+=$(find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;)
226227
case "$HOST" in
227228
*linux*) HOST_CFLAGS+=" -ffile-prefix-map=${PWD}=." ;;
228229
*mingw*) HOST_CFLAGS+=" -fno-ident" ;;

0 commit comments

Comments
 (0)