Support compilation with CompCert out of the box

This commit is contained in:
Frank Denis
2026-01-03 20:20:48 +01:00
parent 3878a20a6e
commit ecd2f868d3
+15
View File
@@ -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])