aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2021-09-22 11:50:15 -0700
committerEric Biggers <ebiggers@google.com>2021-09-22 11:55:11 -0700
commitddc6bc9daeb79db932aa12edb85c7c2f4647472a (patch)
treea1e6580efa9402ae0b37b91b1c808cdea79a79a2
parent283177849d3b861ed088115f210fa7d76e717b5d (diff)
downloadfsverity-utils-ddc6bc9daeb79db932aa12edb85c7c2f4647472a.tar.gz
Makefile: use -Wno-deprecated-declarations to avoid OpenSSL 3.0 warnings
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c97790e..81b7b6d 100644
--- a/Makefile
+++ b/Makefile
@@ -44,8 +44,13 @@ ifneq ($(findstring -mingw,$(shell $(CC) -dumpmachine 2>/dev/null)),)
MINGW = 1
endif
+# Set the CFLAGS. First give the warning-related flags (unconditionally, though
+# the user can override any of them by specifying the opposite flag); then give
+# the user-specifed CFLAGS, defaulting to -O2 if none were specified.
+#
+# Use -Wno-deprecated-declarations to avoid warnings about the Engine API having
+# been deprecated in OpenSSL 3.0; the replacement isn't ready yet.
CFLAGS ?= -O2
-
override CFLAGS := -Wall -Wundef \
$(call cc-option,-Wdeclaration-after-statement) \
$(call cc-option,-Wimplicit-fallthrough) \
@@ -54,6 +59,7 @@ override CFLAGS := -Wall -Wundef \
$(call cc-option,-Wstrict-prototypes) \
$(call cc-option,-Wunused-parameter) \
$(call cc-option,-Wvla) \
+ $(call cc-option,-Wno-deprecated-declarations) \
$(CFLAGS)
override CPPFLAGS := -Iinclude -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $(CPPFLAGS)