]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: silence unbearable OpenSSL deprecation warnings
authorWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 14:31:31 +0000 (16:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 Apr 2022 17:31:47 +0000 (19:31 +0200)
OpenSSL 3.0 emits tons of deprecation warnings for the engine API, and
it becomes a real problem because these hide other real warnings and
will prevent distros from building with -Werror. Fortunately there's a
macro to shut this one, OPENSSL_SUPPRESS_DEPRECATED, that is sufficient
to get things back to normal, so let's define it when USE_ENGINE is set.
This way we still get a chance to see other deprecation warnings when
engines are not used.

Makefile

index fc0ae67babc61df3b9649cf3369bff90eb791035..026e334c6c32a138017852b917d2e4d58804baf8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -623,6 +623,15 @@ OPTIONS_LDFLAGS += -ldl
 endif
 OPTIONS_OBJS  += src/ssl_sample.o src/ssl_sock.o src/ssl_crtlist.o src/ssl_ckch.o src/ssl_utils.o src/cfgparse-ssl.o src/jwt.o
 endif
+
+ifneq ($(USE_ENGINE),)
+# OpenSSL 3.0 emits loud deprecation warnings by default when building with
+# engine support, and this option is made to silence them. Better use it
+# only when absolutely necessary, until there's a viable alternative to the
+# engine API.
+OPTIONS_CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED
+endif
+
 ifneq ($(USE_QUIC),)
 OPTIONS_OBJS += src/quic_sock.o src/proto_quic.o src/xprt_quic.o src/quic_tls.o \
                 src/quic_frame.o src/quic_cc.o src/quic_cc_newreno.o src/mux_quic.o \