FIX BUILD (Windows): Copy the ln trick used by the GMP build
authorSimon Marlow <simonmar@microsoft.com>
Mon, 14 Apr 2008 17:32:25 +0000 (17:32 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Mon, 14 Apr 2008 17:32:25 +0000 (17:32 +0000)
libffi/Makefile
libffi/ln [new file with mode: 0644]

index 3a7cb69..bd9e658 100644 (file)
@@ -53,11 +53,16 @@ endif
 
 install all :: $(INSTALL_HEADERS) $(INSTALL_LIBS) $(INSTALL_PROGS)
 
 
 install all :: $(INSTALL_HEADERS) $(INSTALL_LIBS) $(INSTALL_PROGS)
 
+# We have to fake a non-working ln for configure, so that the fallback
+# option (cp -p) gets used instead.  Otherwise the libffi build system
+# will use cygwin symbolic linkks which cannot be read by mingw gcc.
+# The same trick is played by the GMP build in ../gmp.
+
 stamp.ffi.static:
        $(RM) -rf $(LIBFFI_DIR) build
        $(TAR) -zxf $(LIBFFI_TARBALL)
        mv $(LIBFFI_DIR) build
 stamp.ffi.static:
        $(RM) -rf $(LIBFFI_DIR) build
        $(TAR) -zxf $(LIBFFI_TARBALL)
        mv $(LIBFFI_DIR) build
-#      chmod +x ln
+       chmod +x ln
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            PATH=`pwd`:$$PATH; \
            export PATH; \
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            PATH=`pwd`:$$PATH; \
            export PATH; \
@@ -70,7 +75,7 @@ stamp.ffi.shared:
        $(RM) -rf $(LIBFFI_DIR) build-shared
        $(TAR) -zxf $(LIBFFI_TARBALL)
        mv $(LIBFFI_DIR) build-shared
        $(RM) -rf $(LIBFFI_DIR) build-shared
        $(TAR) -zxf $(LIBFFI_TARBALL)
        mv $(LIBFFI_DIR) build-shared
-#      chmod +x ln
+       chmod +x ln
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            PATH=`pwd`:$$PATH; \
            export PATH; \
        (set -o igncr 2>/dev/null) && set -o igncr; export SHELLOPTS; \
            PATH=`pwd`:$$PATH; \
            export PATH; \
diff --git a/libffi/ln b/libffi/ln
new file mode 100644 (file)
index 0000000..a3a297c
--- /dev/null
+++ b/libffi/ln
@@ -0,0 +1,3 @@
+#!/bin/sh
+exit 1
+