From 835d874df1973b7e1c602a747b42b77095592a9c Mon Sep 17 00:00:00 2001 From: Reid Barton Date: Sun, 21 Sep 2014 08:53:37 -0400 Subject: Make libffi install into a predictable directory (#9620) On some systems (depending on gcc multilib configuration) libffi would install into libffi/build/inst/lib64 even though we configure it with --libdir=libffi/build/inst/lib. There appears to be no way to get libffi to install to a predictable directory "out of the box", so we apply a small patch to Makefile.in. This is the same fix used in Gentoo's ebuild (https://bugs.gentoo.org/show_bug.cgi?id=462814). --- libffi/ghc.mk | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libffi') diff --git a/libffi/ghc.mk b/libffi/ghc.mk index bc62ad9721..4e177d24a4 100644 --- a/libffi/ghc.mk +++ b/libffi/ghc.mk @@ -69,6 +69,13 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP) mv libffi/build/Makefile.in libffi/build/Makefile.in.orig sed "s/-MD/-MMD/" < libffi/build/Makefile.in.orig > libffi/build/Makefile.in + # We attempt to specify the installation directory below with --libdir, + # but libffi installs into 'toolexeclibdir' instead, which may differ + # on systems where gcc has multilib support. Force libffi to use libdir. + # (https://sourceware.org/ml/libffi-discuss/2014/msg00016.html) + mv libffi/build/Makefile.in libffi/build/Makefile.in.orig + sed 's:@toolexeclibdir@:$$(libdir):g' < libffi/build/Makefile.in.orig > libffi/build/Makefile.in + # Their cmd invocation only works on msys. On cygwin it starts # a cmd interactive shell. The replacement works in both environments. mv libffi/build/ltmain.sh libffi/build/ltmain.sh.orig -- cgit v1.2.1