[v2] configure: add ABIGAIL_DEBUG options
Commit Message
When exporting ABIGAIL_DEBUG=1, the binaries compiled are especially
suitable for debugging. The CFLAGS and CXXFLAGS that are added reduce
optimization to a reasonable amount and increase debug information levels.
* configure.ac: add ABIGAIL_DEBUG environment variable for
improved debugging capabilities
Signed-off-by: Matthias Maennich <maennich@google.com>
---
configure.ac | 5 +++++
1 file changed, 5 insertions(+)
Comments
Matthias Maennich <maennich@google.com> a écrit:
> When exporting ABIGAIL_DEBUG=1, the binaries compiled are especially
> suitable for debugging. The CFLAGS and CXXFLAGS that are added reduce
> optimization to a reasonable amount and increase debug information levels.
>
> * configure.ac: add ABIGAIL_DEBUG environment variable for
> improved debugging capabilities
>
> Signed-off-by: Matthias Maennich <maennich@google.com>
Acked-by: Dodji Seketeli <dodji@seketeli.org>
Applied to master, thanks!
Cheers,
@@ -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 -Og -g3 -ggdb"
+ CXXFLAGS="$CXXFLAGS -Og -g3 -ggdb"
+fi
+
if test x$ENABLE_ASAN = xyes; then
CFLAGS="$CFLAGS -fsanitize=address"
CXXFLAGS="$CXXFLAGS -fsanitize=address"