[Libreoffice-commits] core.git: configure.ac
Stephan Bergmann
sbergman at redhat.com
Wed Sep 13 11:19:02 UTC 2017
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 2d22b39fb7ddbb02f246e2943b228931e5d583e1
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Sep 13 13:16:10 2017 +0200
Clamp minor/patchlevel when computing CLANG_VERSION
...so it doesn't overflow for odd version numbers like
<https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER
&full-log=1505293801.994#53>'s 'clang --version' reportedly returning "Android
clang version 5.0.300080 (based on LLVM 5.0.300080) […]"
Change-Id: I7e3b3e0fa93d48fbbfa7a9b71e91776f976ed0da
diff --git a/configure.ac b/configure.ac
index edfc281ebfb0..5f7f7c918fc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3668,7 +3668,8 @@ if test "$COM_IS_CLANG" = TRUE; then
fi
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC_PLAIN $my_args -`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC_PLAIN $my_args -`
- CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+ CLANGVER=`echo $clang_version \
+ | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
More information about the Libreoffice-commits
mailing list