From bb1b63c0799f082629885f417a5282a7723e7e59 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 15 Apr 2020 17:00:03 +0200 Subject: [PATCH] MINOR: init: report the compiler version in haproxy -vv Some portability issues were met a few times in the past depending on compiler versions, but this one was not reported in haproxy -vv output while it's trivial to add it. This patch tries to be the most accurate by explicitly reporting the clang version if detected, otherwise the gcc version. --- src/haproxy.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index b06a78004..d01ddfdab 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -3692,6 +3692,11 @@ int main(int argc, char **argv) exit(0); } +#if defined(__clang_version__) +REGISTER_BUILD_OPTS("Built with clang compiler version " __clang_version__); +#elif defined(__VERSION__) +REGISTER_BUILD_OPTS("Built with gcc compiler version " __VERSION__); +#endif /* * Local variables: