From 8838983458628328ab415f53dbfc7a7088083bf4 Mon Sep 17 00:00:00 2001
From: Ian Lynagh <igloo@earth.li>
Date: Thu, 6 Oct 2011 16:27:37 +0100
Subject: Build fixes for OS X amd64 following libffi update

---
 libffi/ghc.mk | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'libffi')

diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index 9dcf2c54a3..3aa1cbc296 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -137,6 +137,11 @@ $(libffi_STAMP_CONFIGURE):
 	  "$(CP)" build/libtool build/libtool.orig && \
 	  sed -e s/dlname=\'\$$tdlname\'/dlname=\'\$$dlname\'/ build/libtool.orig > build/libtool
 
+	# wc on OS X has spaces in its output, which libffi's Makefile
+	# doesn't expect, so we tweak it to sed them out
+	mv libffi/build/Makefile libffi/build/Makefile.orig
+	sed "s#wc -w#wc -w | sed 's/ //g'#" < libffi/build/Makefile.orig > libffi/build/Makefile
+
 	touch $@
 
 libffi/dist-install/build/ffi.h: $(libffi_STAMP_CONFIGURE) libffi/dist-install/build/ffitarget.h | $$(dir $$@)/.
-- 
cgit v1.2.1