summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-05-29 12:19:31 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-13 09:35:44 -0400
commitdda61f79555807db52f0ef7be360f4c76ada4c90 (patch)
treeb532fe6f4624e29034dfecf25e2a44e09c290bda
parent7bfa895547734e7c4ef10a19399da6d1f4968d8e (diff)
downloadhaskell-dda61f79555807db52f0ef7be360f4c76ada4c90.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 94c2ce38ee..b0dc34c2b4 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -827,10 +827,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"