From 7003079d8776a89875b3788de20175dc102f3d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Mon, 11 Oct 2021 14:20:46 +0200 Subject: [PATCH] configure: Support parsing weird clang versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seems some distributions will change the clang version output to be something like 'Ubuntu clang version 12.0.1-++20210918042554+fed41342a82f-1~exp1~20210918143322.141'. Fix the version parsing in configure to not barf on such weird version strings. Signed-off-by: Toke Høiland-Jørgensen --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 936bfaa..06fc1fe 100755 --- a/configure +++ b/configure @@ -27,8 +27,8 @@ check_toolchain() fi; done - clang_version=$($CLANG --version | sed -n '/clang version/ s/clang version // p') - if [ "${clang_version//\.[0-9\.]*/}" -lt "11" ]; then + clang_version=$($CLANG --version | sed -n '/clang version/ s/^.*clang version // p') + if [ "${clang_version//.*/}" -lt "11" ]; then echo "ERROR: Need clang version >= 11, found $clang_version" exit 1 fi