From: openocd-gerrit <ope...@us...> - 2025-01-25 10:37:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 8038e2f7548792a090bdd255ec6bfbf4128fead7 (commit) from ac18b8cd6a3f21b97f942efdbb0ec2f362bb132b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8038e2f7548792a090bdd255ec6bfbf4128fead7 Author: Antonio Borneo <bor...@gm...> Date: Sun Nov 17 22:46:15 2024 +0100 configure: allow --enable-malloc-logging only with glibc The feature for 'malloc-logging' uses functionalities that are available only in GNU libc. Detect in 'configure' if OpenOCD is being compiled with glibc. Set the macro '_DEBUG_FREE_SPACE_' only in case of glibc. Change-Id: I43e9b87c7ad47171cfe3e7c1e5f96f11e19f98d0 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8592 Tested-by: jenkins diff --git a/configure.ac b/configure.ac index fc1e20ef8..a558650b3 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,11 @@ AC_CHECK_TYPE([Elf64_Ehdr], AC_DEFINE([HAVE_ELF64], [1], [Define to 1 if the system has the type 'Elf64_Ehdr'.]), [], [[#include <elf.h>]]) +AC_MSG_CHECKING([for glibc]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <features.h>]], [[int v = __GLIBC__;return 0;]])], + [have_glibc=yes], [have_glibc=no]) +AC_MSG_RESULT($have_glibc) + AC_CHECK_HEADERS([fcntl.h]) AC_CHECK_HEADERS([malloc.h]) AC_CHECK_HEADERS([netdb.h]) @@ -262,7 +267,7 @@ AC_ARG_ENABLE([malloc_logging], AC_MSG_CHECKING([whether to enable malloc free space logging]); AC_MSG_RESULT([$debug_malloc]) -AS_IF([test "x$debug_malloc" = "xyes"], [ +AS_IF([test "x$debug_malloc" = "xyes" -a "x$have_glibc" = "xyes"], [ AC_DEFINE([_DEBUG_FREE_SPACE_],[1], [Include malloc free space in logging]) ]) ----------------------------------------------------------------------- Summary of changes: configure.ac | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |