From 9ec238d0f3c7b97aec83dbeb4c7a6950c8f5125e Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 22 Dec 2023 10:42:58 +0000 Subject: [PATCH] guix: remove ZERO_AR_DATE export LLD enables ZERO_AR_DATE by default, setting it to zero would enable non-determinism, setting it to any other value is ignored. See: https://github.com/llvm/llvm-project/blob/main/lld/docs/MachO/ld64-vs-lld.rst. --- contrib/guix/libexec/build.sh | 10 ---------- contrib/macdeploy/README.md | 3 --- depends/gen_id | 1 - 3 files changed, 14 deletions(-) diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 1e9b682f3f6..e0c8baf3fed 100755 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -173,16 +173,6 @@ esac # Environment variables for determinism 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 # diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md index ed945b72d15..78f61685e13 100644 --- a/contrib/macdeploy/README.md +++ b/contrib/macdeploy/README.md @@ -63,9 +63,6 @@ functionality so that a vanilla clang can take advantage. It supports the use of `-target`, `-mmacosx-version-min`, and `-isysroot`, which are all necessary when building for macOS. -These tools inject timestamps by default, which produce non-deterministic binaries. The -`ZERO_AR_DATE` environment variable is used to disable that. - To complicate things further, all builds must target an Apple SDK. These SDKs are free to download, but not redistributable. See the SDK Extraction notes above for how to obtain it. diff --git a/depends/gen_id b/depends/gen_id index 8518b4e6744..e2e2273b2d6 100755 --- a/depends/gen_id +++ b/depends/gen_id @@ -53,7 +53,6 @@ echo "BEGIN AR" bash -c "${AR} --version" env | grep '^AR_' - echo "ZERO_AR_DATE=${ZERO_AR_DATE}" echo "END AR" echo "BEGIN NM"