Commit 835d874d authored by rwbarton's avatar rwbarton
Browse files

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).
parent bfc71956
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment