Incorporates #20368 Also uses a recent libffi tarball for generating bindists. This may not matter so much for x86_64 but the libffi tarball ghc bundles by default is from 2017 and there is an assortment of bugs that would be too much effort to patch. Instead just fetch a fresh, confirmed-to-work tarball from upstream source. Currently selected revision is 4d6d286 because that's almost just the official 3.3 release, but with a bunch of fixes applied (which we are patching in in our own libffi). It was selected to predate some more invasive changes made in libffi master.
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
Since we replace bundled tarball with our own and it's a git
|
|
snapshot, it is necessary to generate the build system ourselves
|
|
|
|
Source: @q66
|
|
|
|
--- a/libffi/ghc.mk
|
|
+++ b/libffi/ghc.mk
|
|
@@ -58,16 +58,7 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
|
|
$(CP) "$(TOP)/config.guess" libffi/build/config.guess
|
|
$(CP) "$(TOP)/config.sub" libffi/build/config.sub
|
|
|
|
-# 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 links which cannot be read by mingw gcc.
|
|
- chmod +x libffi/ln
|
|
-
|
|
- # We need to use -MMD rather than -MD, as otherwise we get paths
|
|
- # like c:/... in the dependency files on Windows, and the extra
|
|
- # colons break make
|
|
- mv libffi/build/Makefile.in libffi/build/Makefile.in.orig
|
|
- sed "s/-MD/-MMD/" < libffi/build/Makefile.in.orig > libffi/build/Makefile.in
|
|
+ cd libffi && cd build && "$(SHELL)" ./autogen.sh
|
|
|
|
# We attempt to specify the installation directory below with --libdir,
|
|
# but libffi installs into 'toolexeclibdir' instead, which may differ
|