summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ghc.mk10
-rw-r--r--mk/project.mk.in7
2 files changed, 17 insertions, 0 deletions
diff --git a/ghc.mk b/ghc.mk
index 2481001224..070ddfe45b 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -820,6 +820,16 @@ install_mingw : $(INPLACE_MINGW)
endif # Windows_Host
+# the following is the work around suggested by @carter in #17418 during install
+# time. This should help us with code signing issues by removing extended
+# attribuets from all files.
+ifeq "$(Darwin_Host)" "YES"
+install : install_darwin
+.PHONY: install_darwin
+install_darwin:
+ xattr -c -r .
+endif # Darwin_Host
+
ifneq "$(BINDIST)" "YES"
$(ghc-prim-$(libraries/ghc-prim_dist-install_VERSION)_HADDOCK_FILE): \
libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs
diff --git a/mk/project.mk.in b/mk/project.mk.in
index e40a73bf13..4f82b1607a 100644
--- a/mk/project.mk.in
+++ b/mk/project.mk.in
@@ -143,6 +143,13 @@ else
Windows_Host=NO
endif
+# Darwin_Host=YES if on a Darwin platform
+ifneq "$(findstring $(HostOS_CPP), darwin)" ""
+Darwin_Host=YES
+else
+Darwin_Host=NO
+endif
+
# Windows_Target=YES if we are targeting a Windows platform
ifneq "$(findstring $(TargetOS_CPP), mingw32)" ""
Windows_Target=YES