Skip to content

Commit

Permalink
Add --disable-werror
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ffontaine authored and smuellerDD committed Nov 7, 2022
1 parent 4d9bbc8 commit c27b154
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down

0 comments on commit c27b154

Please sign in to comment.