12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- From c27b154f03ad7e94447c7114d73aee60f0098093 Mon Sep 17 00:00:00 2001
- From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
- Date: Mon, 7 Nov 2022 13:38:06 +0100
- Subject: [PATCH] Add --disable-werror
- Allow the user to disable -Werror through --disable-werror
- Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
- Signed-off-by: Stephan Mueller <smueller@chronox.de>
- [Retrieved from:
- https://github.com/smuellerDD/libkcapi/commit/c27b154f03ad7e94447c7114d73aee60f0098093]
- ---
- Makefile.am | 5 ++++-
- configure.ac | 3 +++
- 2 files changed, 7 insertions(+), 1 deletion(-)
- diff --git a/Makefile.am b/Makefile.am
- index 1c95d3d..cddedac 100644
- --- a/Makefile.am
- +++ b/Makefile.am
- @@ -2,7 +2,10 @@ ACLOCAL_AMFLAGS = -I m4
- AUTOMAKE_OPTIONS = subdir-objects
- lib_LTLIBRARIES = libkcapi.la
-
- -COMMON_CPPFLAGS = -Wextra -Wall -pedantic -fwrapv --param ssp-buffer-size=4 -O2 -Werror -std=gnu99 -Wconversion
- +COMMON_CPPFLAGS = -Wextra -Wall -pedantic -fwrapv --param ssp-buffer-size=4 -O2 -std=gnu99 -Wconversion
- +if ENABLE_WERROR
- +COMMON_CPPFLAGS += -Werror
- +endif
- COMMON_LDFLAGS = -Wl,-z,relro,-z,now
-
- libtool: $(LIBTOOL_DEPS)
- diff --git a/configure.ac b/configure.ac
- index cb910e2..e230577 100644
- --- a/configure.ac
- +++ b/configure.ac
- @@ -76,6 +76,9 @@ AX_ADD_FORTIFY_SOURCE
-
- AC_CHECK_API_VERSION
-
- +AC_ARG_ENABLE([werror], [AS_HELP_STRING([--disable-werror], [Disable -Werror])], [with_werror=$enableval], [with_werror=yes])
- +AM_CONDITIONAL([ENABLE_WERROR], [test "x$with_werror" = "xyes"])
- +
- AC_ARG_ENABLE([kcapi-test], [AS_HELP_STRING([--enable-kcapi-test], [Compile kcapi test program])], [with_kcapi_test=$enableval])
- AM_CONDITIONAL([ENABLE_KCAPI_TEST], [test "x$with_kcapi_test" = "xyes"])
-
|