Skip to content

Commit 34b23f5

Browse files
committed
guix: Set ZERO_AR_DATE for darwin build determinism
See comments inserted in this commit.
1 parent f3835dc commit 34b23f5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

contrib/guix/libexec/build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,16 @@ export QT_RCC_TEST=1
148148
export QT_RCC_SOURCE_DATE_OVERRIDE=1
149149
export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
150150
export TZ="UTC"
151+
case "$HOST" in
152+
*darwin*)
153+
# cctools AR, unlike GNU binutils AR, does not have a deterministic mode
154+
# or a configure flag to enable determinism by default, it only
155+
# understands if this env-var is set or not. See:
156+
#
157+
# https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334
158+
export ZERO_AR_DATE=yes
159+
;;
160+
esac
151161

152162
####################
153163
# Depends Building #

0 commit comments

Comments
 (0)