From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118491 invoked by alias); 29 Oct 2019 21:15:35 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 118257 invoked by uid 89); 29 Oct 2019 21:15:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-19.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Oct 2019 21:15:00 +0000 Received: from librem (deer0x15.wildebeest.org [172.31.17.151]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 0D028302BB3C; Tue, 29 Oct 2019 22:14:53 +0100 (CET) Received: by librem (Postfix, from userid 1000) id 05ABAC0236; Tue, 29 Oct 2019 22:14:52 +0100 (CET) From: Mark Wielaard To: elfutils-devel@sourceware.org Cc: Jonathon Anderson Subject: [PATCH 1/2] Add configure options for Valgrind annotations. Date: Tue, 29 Oct 2019 21:15:00 -0000 Message-Id: <20191029211437.3268-1-mark@klomp.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <1572380520.19948.0@rice.edu> References: <1572380520.19948.0@rice.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q4/txt/msg00078.txt.bz2 From: Jonathon Anderson Signed-off-by: Jonathon Anderson --- ChangeLog | 5 +++++ configure.ac | 30 ++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/ChangeLog b/ChangeLog index 911cf354..433a5f3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-08-25 Jonathon Anderson + + * configure.ac: Add new --enable-valgrind-annotations + * configure.ac: Add new --with-valgrind (headers only) + 2019-07-05 Omar Sandoval * configure.ac: Get rid of --enable-libebl-subdir. diff --git a/configure.ac b/configure.ac index 9be34d12..7fc3acb6 100644 --- a/configure.ac +++ b/configure.ac @@ -335,6 +335,35 @@ if test "$use_valgrind" = yes; then fi AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes) +AC_ARG_WITH([valgrind], +AS_HELP_STRING([--with-valgrind],[include directory for Valgrind headers]), +[with_valgrind_headers=$withval], [with_valgrind_headers=no]) +if test "x$with_valgrind_headers" != xno; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -I$with_valgrind_headers" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { return 0; } + ]])], [ HAVE_VALGRIND_HEADERS="yes" + CFLAGS="$save_CFLAGS -I$with_valgrind_headers" ], + [ AC_MSG_ERROR([invalid valgrind include directory: $with_valgrind_headers]) ]) +fi + +AC_ARG_ENABLE([valgrind-annotations], +AS_HELP_STRING([--enable-valgrind-annotations],[insert extra annotations for better valgrind support]), +[use_vg_annotations=$enableval], [use_vg_annotations=no]) +if test "$use_vg_annotations" = yes; then + if test "x$HAVE_VALGRIND_HEADERS" != "xyes"; then + AC_MSG_CHECKING([whether Valgrind headers are available]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { return 0; } + ]])], [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_ERROR([valgrind annotations requested but no headers are available]) ]) + fi +fi +AM_CONDITIONAL(USE_VG_ANNOTATIONS, test "$use_vg_annotations" = yes) + AC_ARG_ENABLE([install-elfh], AS_HELP_STRING([--enable-install-elfh],[install elf.h in include dir]), [install_elfh=$enableval], [install_elfh=no]) @@ -669,6 +698,7 @@ AC_MSG_NOTICE([ OTHER FEATURES Deterministic archives by default : ${default_ar_deterministic} Native language support : ${USE_NLS} + Extra Valgrind annotations : ${use_vg_annotations} EXTRA TEST FEATURES (used with make check) have bunzip2 installed (required) : ${HAVE_BUNZIP2} -- 2.20.1