aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/libexec/build.sh
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-11-23 14:58:33 -0500
committerCarl Dong <contact@carldong.me>2021-01-21 10:58:12 -0500
commit34b23f597ec52efb795d72e9e5620712d0010edd (patch)
tree9a262cf9ade79b64413f118a75564ab940e92758 /contrib/guix/libexec/build.sh
parentf3835dc6a3732dcd4afbb5987f84dc27f2bf55af (diff)
guix: Set ZERO_AR_DATE for darwin build determinism
See comments inserted in this commit.
Diffstat (limited to 'contrib/guix/libexec/build.sh')
-rw-r--r--contrib/guix/libexec/build.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
index 77411377e5..39d3cb9b50 100644
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -148,6 +148,16 @@ export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
export TZ="UTC"
+case "$HOST" in
+ *darwin*)
+ # cctools AR, unlike GNU binutils AR, does not have a deterministic mode
+ # or a configure flag to enable determinism by default, it only
+ # understands if this env-var is set or not. See:
+ #
+ # https://github.com/tpoechtrager/cctools-port/blob/55562e4073dea0fbfd0b20e0bf69ffe6390c7f97/cctools/ar/archive.c#L334
+ export ZERO_AR_DATE=yes
+ ;;
+esac
####################
# Depends Building #