[commit: ghc] master: Make libffi install into a predictable directory (#9620) (835d874)

git at git.haskell.org git at git.haskell.org
Sun Sep 21 13:24:59 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/835d874df1973b7e1c602a747b42b77095592a9c/ghc

>---------------------------------------------------------------

commit 835d874df1973b7e1c602a747b42b77095592a9c
Author: Reid Barton <rwbarton at gmail.com>
Date:   Sun Sep 21 08:53:37 2014 -0400

    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).


>---------------------------------------------------------------

835d874df1973b7e1c602a747b42b77095592a9c
 libffi/ghc.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index bc62ad9..4e177d2 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



More information about the ghc-commits mailing list