ibmtss/ibmtss-configure.ac-Do-not-disable-optimization-for-debug-b.patch

29 lines
1004 B
Diff
Raw Permalink Normal View History

From 005064b673d937a305427eb9fa4d549f93f6090a Mon Sep 17 00:00:00 2001
From: Michal Suchanek <msuchanek@suse.de>
Date: Mon, 17 Aug 2020 18:21:51 +0200
Subject: [PATCH] configure.ac: Do not disable optimization for debug build.
This conflicts with FORTIFY_SOURCE and generates completely different
assembly for debug and procuction.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ AC_CHECK_FUNCS([gethostbyname memmove memset socket strerror strtoul])
# Replace autotools default optimization
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug], [Build a TSS library used for debugging]))
- AS_IF([test "$enable_debug" = "yes"], [CFLAGS="$USER_CFLAGS -g -ggdb -O0"])
+ AS_IF([test "$enable_debug" = "yes"], [CFLAGS="$USER_CFLAGS -g -ggdb -Wextra -Werror"])
# Linux requires -DTPM_POSIX
case $host_os in
--
2.26.2