Fix ffi build on amd64/Linux, and simplify a little more
authorIan Lynagh <igloo@earth.li>
Fri, 14 Oct 2011 12:45:35 +0000 (13:45 +0100)
committerIan Lynagh <igloo@earth.li>
Fri, 14 Oct 2011 12:45:35 +0000 (13:45 +0100)
libffi/ghc.mk

index f6e99c2..22ce638 100644 (file)
 # -----------------------------------------------------------------------------
 
 
-ifeq "$(BuildSharedLibs)" "YES"
-libffi_STAMP_CONFIGURE = libffi/stamp.ffi.configure-shared
-libffi_STAMP_BUILD     = libffi/stamp.ffi.build-shared
-libffi_STAMP_INSTALL   = libffi/stamp.ffi.install-shared
-else
 libffi_STAMP_CONFIGURE = libffi/stamp.ffi.configure
 libffi_STAMP_BUILD     = libffi/stamp.ffi.build
 libffi_STAMP_INSTALL   = libffi/stamp.ffi.install
-endif
 
 libffi_STATIC_LIB  = libffi/build/inst/lib/libffi.a
 ffi_HEADER         = rts/dist/build/ffi.h
 
-ifeq "$(BuildSharedLibs)" "YES"
-libffi_EnableShared=yes
-else
-libffi_EnableShared=no
-endif
-
 ifneq "$(BINDIST)" "YES"
 $(libffi_STAMP_CONFIGURE):
        "$(RM)" $(RM_OPTS_REC) $(LIBFFI_DIR) libffi/build
@@ -55,8 +43,9 @@ $(libffi_STAMP_CONFIGURE):
         LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \
         "$(SHELL)" configure \
                  --prefix=$(TOP)/libffi/build/inst \
+                 --with-pic \
                  --enable-static=yes \
-                 --enable-shared=$(libffi_EnableShared) \
+                 --enable-shared=no \
                  --host=$(HOSTPLATFORM) --build=$(BUILDPLATFORM)
 
        # wc on OS X has spaces in its output, which libffi's Makefile