summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libffi/ghc.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index a37e3becfd..19b6f439d0 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -79,6 +79,11 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
mv libffi/build/Makefile.in libffi/build/Makefile.in.orig
sed 's:@toolexeclibdir@:$$(libdir):g' < libffi/build/Makefile.in.orig > libffi/build/Makefile.in
+ # install-sh is used when /usr/bin/install is missing; ensure its
+ # path in libffi's Makefile is correct. See GHC #11109.
+ mv libffi/build/Makefile.in libffi/build/Makefile.in.orig
+ sed 's:@INSTALL@:$$(subst ../install-sh,$(TOP)/install-sh,@INSTALL@):g' < libffi/build/Makefile.in.orig > libffi/build/Makefile.in
+
# * Because -Werror may be in SRC_CC_OPTS/SRC_LD_OPTS, we need to turn
# warnings off or the compilation of libffi might fail due to warnings;
# hence the -w flags.