From e120d5b4113ae6a219080d9a0b5853940a703d47 Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Wed, 24 May 2023 15:19:26 +0100 Subject: [PATCH] Remove detection for -lexecinfo This was needed for caml_print_trace in multicore, but this function was removed prior to merging. The functions in execinfo.h are used in the tests for frame pointers, but this is Linux-only and the functions are implemented in glibc. --- Changes | 4 ++++ configure | 41 ----------------------------------------- configure.ac | 2 -- 3 files changed, 4 insertions(+), 43 deletions(-) diff --git a/Changes b/Changes index 1201a69a2077..0bfc76b93c85 100644 --- a/Changes +++ b/Changes @@ -747,6 +747,10 @@ OCaml 5.1.0 exception backtraces for them. (Xavier Leroy, review by David Allsopp, report by Fabrice Le Fessant) +- #12265: Stop adding -lexecinfo to cclibs (leftover debugging code from the + multicore project). + (David Allsopp, review by Sébastien Hinderer) + ### Bug fixes: - #12017: Re-register finaliser only after calling user alarm in Gc.create_alarm diff --git a/configure b/configure index ec2b87f68d2a..1557df211435 100755 --- a/configure +++ b/configure @@ -19659,47 +19659,6 @@ ocamlc_cflags="$common_cflags $sharedlib_cflags $CFLAGS" ocamlc_cppflags="$common_cppflags $CPPFLAGS" cclibs="$cclibs $mathlib" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lexecinfo" >&5 -printf %s "checking for backtrace in -lexecinfo... " >&6; } -if test ${ac_cv_lib_execinfo_backtrace+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-lexecinfo $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char backtrace (); -int -main (void) -{ -return backtrace (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_execinfo_backtrace=yes -else $as_nop - ac_cv_lib_execinfo_backtrace=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_execinfo_backtrace" >&5 -printf "%s\n" "$ac_cv_lib_execinfo_backtrace" >&6; } -if test "x$ac_cv_lib_execinfo_backtrace" = xyes -then : - cclibs="$cclibs -lexecinfo" -fi - - case $host in #( *-*-mingw32*) : bytecclibs="-lws2_32 -lversion -l:libpthread.a -lgcc_eh" diff --git a/configure.ac b/configure.ac index b9dbfc6809a4..c121b48b0508 100644 --- a/configure.ac +++ b/configure.ac @@ -2225,8 +2225,6 @@ ocamlc_cflags="$common_cflags $sharedlib_cflags $CFLAGS" ocamlc_cppflags="$common_cppflags $CPPFLAGS" cclibs="$cclibs $mathlib" -AC_CHECK_LIB(execinfo, backtrace, cclibs="$cclibs -lexecinfo",[]) - AS_CASE([$host], [*-*-mingw32*], [bytecclibs="-lws2_32 -lversion -l:libpthread.a -lgcc_eh"