From patchwork Mon May 11 15:24:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Matthias_M=C3=A4nnich?= X-Patchwork-Id: 39226 X-Patchwork-Delegate: dodji@seketeli.org From: maennich@google.com (Matthias Maennich) Date: Mon, 11 May 2020 17:24:32 +0200 Subject: [PATCH] configure: add ABIGAIL_DEBUG options Message-ID: <20200511152432.22927-1-maennich@google.com> When exporting ABIGAIL_DEBUG=1, the binaries compiled are especially suitable for debugging. The CFLAGS and CXXFLAGS that are added disable optimization and increase debug information levels. * configure.ac: add ABIGAIL_DEBUG environment variable for improved debugging capabilities Signed-off-by: Matthias Maennich Reviewed-by: Matthias Maennich Tested-by: Matthias Maennich Acked-by: Dodji Seketeli --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 9f30ea38cf86..9aea79f49e9a 100644 --- a/configure.ac +++ b/configure.ac @@ -621,6 +621,11 @@ if test x$ABIGAIL_DEVEL != x; then CXXFLAGS="-g -Wall -Wextra -Werror" fi +if test x$ABIGAIL_DEBUG != x; then + CFLAGS="$CFLAGS -O0 -g3 -ggdb" + CXXFLAGS="$CXXFLAGS -O0 -g3 -ggdb" +fi + if test x$ENABLE_ASAN = xyes; then CFLAGS="$CFLAGS -fsanitize=address" CXXFLAGS="$CXXFLAGS -fsanitize=address"