libffi via submodule
authorMoritz Angermann <moritz.angermann@gmail.com>
Thu, 11 May 2017 10:11:12 +0000 (18:11 +0800)
committerMoritz Angermann <moritz.angermann@gmail.com>
Thu, 11 May 2017 10:30:28 +0000 (18:30 +0800)
This is rather annoying. I'd prefer to have a stable release to
use. However libffi-3.2.1 has been released November 12, 2014, and
libffi-4 is TBD. See also https://github.com/libffi/libffi/issues/296

The core reason for this change is that llvm changed the supported
assembly to unified syntax, which libffi-3.2.1 does not use, and hence
fails to compile for arm with llvm. For refence, see the following
issue: https://github.com/libffi/libffi/issues/191

Reviewers: austin, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie, snowleopard

Differential Revision: https://phabricator.haskell.org/D3349

.gitmodules
libffi-tarballs [deleted submodule]
libffi/build [new submodule]
libffi/ghc.mk
packages

index 55d360a..a1af41c 100644 (file)
        path = utils/hsc2hs
        url = ../hsc2hs.git
        ignore = none
-[submodule "libffi-tarballs"]
-       path = libffi-tarballs
-       url = ../libffi-tarballs.git
-       ignore = none
 [submodule "gmp-tarballs"]
        path = libraries/integer-gmp/gmp/gmp-tarballs
        url = ../gmp-tarballs.git
 [submodule ".arc-linters/arcanist-external-json-linter"]
        path = .arc-linters/arcanist-external-json-linter
        url = ../arcanist-external-json-linter.git
+[submodule "libffi/build"]
+       path = libffi/build
+       url = https://github.com/libffi/libffi.git
diff --git a/libffi-tarballs b/libffi-tarballs
deleted file mode 160000 (submodule)
index ec37a68..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit ec37a68838566cb830c33cb30bfade003a306cff
diff --git a/libffi/build b/libffi/build
new file mode 160000 (submodule)
index 0000000..b841ae7
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit b841ae70a05a5e11de1fca1b4551189db0895cf2
index 7c5bc9e..08f5e4d 100644 (file)
@@ -50,9 +50,8 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
        $(call removeFiles,$(libffi_STAMP_STATIC_SHARED_CONFIGURE))
        $(call removeFiles,$(libffi_STAMP_STATIC_SHARED_BUILD))
        $(call removeFiles,$(libffi_STAMP_STATIC_SHARED_INSTALL))
-       $(call removeTrees,$(LIBFFI_DIR) libffi/build)
-       cat libffi-tarballs/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; }
-       mv libffi/libffi-* libffi/build
+       git clean -x -f -d libffi/build
+       cd libffi/build && ./autogen.sh
 
 # update config.guess/config.sub
        $(CP) "$(TOP)/config.guess" libffi/build/config.guess
@@ -123,10 +122,10 @@ $(libffi_STATIC_LIB): $(libffi_STAMP_INSTALL)
        @test -f $@ || { echo "$< exists, but $@ does not."; echo "Suggest removing $<."; exit 1; }
 
 $(libffi_HEADERS): $(libffi_STAMP_INSTALL) | $$(dir $$@)/.
-       cp -f libffi/build/inst/lib/libffi-*/include/$(notdir $@) $@
+       cp -f libffi/build/inst/include/$(notdir $@) $@
 
 $(eval $(call clean-target,libffi,, \
-    libffi/build $(wildcard libffi/stamp.ffi.*) libffi/dist-install))
+    $(wildcard libffi/stamp.ffi.*) libffi/dist-install))
 
 endif
 
index a99bac6..6efcfb3 100644 (file)
--- a/packages
+++ b/packages
@@ -38,7 +38,7 @@
 # localpath                  tag         remotepath                      upstreamurl
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ghc-tarballs                 windows     ghc-tarballs.git                -
-libffi-tarballs              -           -                               -
+libffi/build                 -           -                               https://github.com/libffi/libffi.git
 utils/hsc2hs                 -           -                               -
 utils/haddock                -           -                               ssh://git@github.com/haskell/haddock.git
 libraries/array              -           -                               -