Skip to content

Commit

Permalink
Specify the libdir to use when building libffi
Browse files Browse the repository at this point in the history
Fixes the build on platforms that default to using a directory called
lib64. Reported by Gabriel Dos Reis.
  • Loading branch information
igfoo committed May 26, 2012
1 parent 278bc1d commit c87371b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libffi/ghc.mk
Expand Up @@ -70,8 +70,11 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
mv libffi/build/ltmain.sh libffi/build/ltmain.sh.orig
sed 's#cmd //c echo "\$$1"#cmd /c "echo $$1"#' < libffi/build/ltmain.sh.orig > libffi/build/ltmain.sh

# 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
# * 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.
# * We specify --libdir, as we need to know the path to libffi.a, but on
# some platforms it defaults to .../lib64/ rather than .../lib/.
cd libffi && \
$(LIBFFI_PATH_MANGLE) \
cd build && \
Expand All @@ -83,6 +86,7 @@ $(libffi_STAMP_CONFIGURE): $(TOUCH_DEP)
LDFLAGS="$(SRC_LD_OPTS) $(CONF_GCC_LINKER_OPTS_STAGE1) -w" \
"$(SHELL)" configure \
--prefix=$(TOP)/libffi/build/inst \
--libdir=$(TOP)/libffi/build/inst/lib \
--enable-static=yes \
--enable-shared=$(libffi_EnableShared) \
--host=$(TargetPlatformFull)
Expand Down

0 comments on commit c87371b

Please sign in to comment.