[commit: ghc] master: Build fixes for OS X amd64 following libffi update (8838983)
Ian Lynagh
igloo at earth.li
Thu Oct 6 19:08:10 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/8838983458628328ab415f53dbfc7a7088083bf4
>---------------------------------------------------------------
commit 8838983458628328ab415f53dbfc7a7088083bf4
Author: Ian Lynagh <igloo at earth.li>
Date: Thu Oct 6 16:27:37 2011 +0100
Build fixes for OS X amd64 following libffi update
>---------------------------------------------------------------
compiler/ghc.mk | 2 ++
libffi/ghc.mk | 5 +++++
rts/ghc.mk | 8 ++++----
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 24d14e7..4b84924 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -265,6 +265,8 @@ PRIMOP_BITS = compiler/primop-data-decl.hs-incl \
compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
compiler_CPP_OPTS += ${GhcCppOpts}
+compiler/stage2/build/LibFFI.hs : libffi/dist-install/build/ffi.h
+
$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
$(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index 9dcf2c5..3aa1cbc 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 $$@)/.
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 5ae873a..9f3680d 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -460,10 +460,10 @@ $(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
#-----------------------------------------------------------------------------
# libffi stuff
-rts_CC_OPTS += -Ilibffi/build/include
-rts_HC_OPTS += -Ilibffi/build/include
-rts_HSC2HS_OPTS += -Ilibffi/build/include
-rts_LD_OPTS += -Llibffi/build/include
+rts_CC_OPTS += -Ilibffi/dist-install/build
+rts_HC_OPTS += -Ilibffi/dist-install/build
+rts_HSC2HS_OPTS += -Ilibffi/dist-install/build
+rts_LD_OPTS += -Llibffi/dist-install/build
# -----------------------------------------------------------------------------
# compile dtrace probes if dtrace is supported
More information about the Cvs-ghc
mailing list