summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-05-29 12:19:31 -0400
committerBen Gamari <ben@smart-cactus.org>2021-05-31 11:59:28 -0400
commitec451cac39de919621c783fec809c26fb9f0d1c8 (patch)
treed9592b592d8e08b054664a351d9d82dbc73eb2bc
parent11e1dcde0d3137a8ee5cd32697b2925ea4e84b95 (diff)
downloadhaskell-ec451cac39de919621c783fec809c26fb9f0d1c8.tar.gz
Don't depend unconditionally on xattr in darwin_install
Previously the Darwin installation logic would attempt to call xattr unconditionally. This would break on older Darwin releases where this utility did not exist.
-rw-r--r--ghc.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/ghc.mk b/ghc.mk
index fbb2befc97..37213c4f6a 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -825,10 +825,12 @@ endif # Windows_Host
# time. This should help us with code signing issues by removing extended
# attribuets from all files.
ifeq "$(Darwin_Host)" "YES"
+XATTR ?= /usr/bin/xattr
+
install : install_darwin
.PHONY: install_darwin
install_darwin:
- xattr -c -r .
+ if [ -e "${XATTR}" ]; then "${XATTR}" -c -r .; fi
endif # Darwin_Host
ifneq "$(BINDIST)" "YES"