Commit b49452458d2611c96069a9ff252aaa6e5a41056c

Thomas de Grivel 2023-08-05T19:09:57

libffi

diff --git a/config.subr b/config.subr
index 1cd2d0a..0397ff0 100644
--- a/config.subr
+++ b/config.subr
@@ -193,6 +193,9 @@ if [ "x$CC" = "x" ]; then
 fi
 echo "CC = $CC" >> ${CONFIG_MK}
 
+CC_TARGET=$(LC_ALL=C cc -v 2>&1 | grep 'Target: ' | cut -c 9-)
+echo "CC_TARGET = $CC_TARGET" >> ${CONFIG_MK}
+
 if [ "x$GCOV" = "x" ]; then
     if which gcov >/dev/null 2>&1; then
 	GCOV=gcov
diff --git a/configure b/configure
index 17b1449..5df749c 100755
--- a/configure
+++ b/configure
@@ -32,7 +32,7 @@ echo "c3-${C3_VERSION}.tar.gz: $(tr '\n' ' ' < c3.index)" >> ${CONFIG_MK}
 
 update_config_mk
 
-( cd libffi && sh autogen.sh || true; MAKE=gmake ./configure; )
+( cd libffi && sh autogen.sh && MAKE=gmake ./configure --disable-multi-os-directory; )
 ( cd libtommath && ./configure; )
 ( cd ucd2c && ./configure; )
 ( cd libc3 && ./configure; )
diff --git a/libc3/tag.h b/libc3/tag.h
index a33531c..19af629 100644
--- a/libc3/tag.h
+++ b/libc3/tag.h
@@ -21,7 +21,6 @@
 
 #include <stdarg.h>
 #include <stdio.h>
-#include "../ffi.h"
 #include "types.h"
 
 #define TAG_FIRST (&g_tag_first)
diff --git a/libc3/types.h b/libc3/types.h
index 67dae59..3fa43f6 100644
--- a/libc3/types.h
+++ b/libc3/types.h
@@ -20,7 +20,7 @@
 #include <pthread.h>
 #include "config.h"
 #include "sha1.h"
-#include "../ffi.h"
+#include "../libffi/include/ffi.h"
 #include "../libtommath/tommath.h"
 
 /* Basic integer types. */
diff --git a/libffi b/libffi
index f839013..6edec9e 160000
--- a/libffi
+++ b/libffi
@@ -1 +1 @@
-Subproject commit f83901327b5856173df3c1c6746afd91ad067248
+Subproject commit 6edec9e63e5bff5ebf3012f3d9a0c3504cb7ddc0