summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuchesar V. ILIEV2016-06-11 01:02:04 +0300
committerLuchesar V. ILIEV2016-06-11 01:07:35 +0300
commit43dea6399770ef491dfb8d3b3b81cec3764592f2 (patch)
tree505ae28ef9f3a67e661d4c0251f818077d19c465
parent0edc264d8f8c4011163dc087c56f36a5a63298e1 (diff)
downloadaur-43dea6399770ef491dfb8d3b3b81cec3764592f2.tar.gz
Fix libffi.so: File in wrong format
For some reason CMake started finding libffi.so in the wrong directory: /lib instead of /lib32. The solution here is to prepend /lib32 to the (usually empty) list in CMAKE_LIBRARY_PATH. There might be a better way to do this and it would be nice to understand what caused the sudden change in the first place, but this should get the job done for now.
-rw-r--r--PKGBUILD7
1 files changed, 7 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index aa1745af7aa9..c90ed55b293b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -82,6 +82,13 @@ prepare() {
svn export --force "${srcdir}/compiler-rt" projects/compiler-rt
mkdir -p "${srcdir}/build"
+
+ # Somehow CMake finds the 64-bit library in /lib first,
+ # so let's preseed CMAKE_LIBRARY_PATH with /lib32.
+ sed -i \
+ '/^[[:blank:]]*find_library(FFI_LIBRARY_PATH/i\
+ list(INSERT CMAKE_LIBRARY_PATH 0 /usr/lib32)' \
+ "${srcdir}/llvm/cmake/config-ix.cmake"
}
build() {