Permalink
Browse files

Build fixes for OS X amd64 following libffi update

  • Loading branch information...
1 parent cd39aea commit 8838983458628328ab415f53dbfc7a7088083bf4 @igfoo igfoo committed Oct 6, 2011
Showing with 11 additions and 4 deletions.
  1. +2 −0 compiler/ghc.mk
  2. +5 −0 libffi/ghc.mk
  3. +4 −4 rts/ghc.mk
View
@@ -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' > $@
View
@@ -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 $$@)/.
View
@@ -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

0 comments on commit 8838983

Please sign in to comment.