From: Willy Tarreau Date: Wed, 15 Apr 2020 15:00:03 +0000 (+0200) Subject: MINOR: init: report the compiler version in haproxy -vv X-Git-Tag: v2.2-dev6~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb1b63c079;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/haproxy.c b/src/haproxy.c index b06a780045..d01ddfdabf 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: