From ecd2f868d3d2e0b55236a307c981b8408ec45374 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 3 Jan 2026 20:19:17 +0100 Subject: [PATCH] Support compilation with CompCert out of the box --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/configure.ac b/configure.ac index aa715895..7fb679ec 100644 --- a/configure.ac +++ b/configure.ac @@ -382,6 +382,21 @@ AS_IF([test "x$with_threads" = "xyes"], [ [AC_MSG_RESULT(thread local storage is not supported)]) ]) LT_INIT + +dnl CompCert compiler support +AC_MSG_CHECKING([if we are using CompCert]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#ifndef __COMPCERT__ +# error __COMPCERT__ is not defined +#endif +]], [[]])], + [AC_MSG_RESULT(yes) + lt_prog_compiler_wl='-Wl,' + enable_asm="no" + CFLAGS="$CFLAGS -fstruct-passing" + AC_MSG_WARN([compiling with CompCert - asm implementations disabled])], + [AC_MSG_RESULT(no)]) + AC_SUBST(LIBTOOL_DEPS) AC_ARG_VAR([AR], [path to the ar utility])