From a5765295ac3e82ede7289e71733b4ad05a15889c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= Date: Mon, 11 Oct 2021 14:23:52 +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 ++-- lib/libbpf | 2 +- 2 files changed, 3 insertions(+), 3 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 diff --git a/lib/libbpf b/lib/libbpf index 5579664..1d6106c 160000 --- a/lib/libbpf +++ b/lib/libbpf @@ -1 +1 @@ -Subproject commit 5579664205e42194e1921d69d0839f660c801a4d +Subproject commit 1d6106cf450c0ba40943f1db77a29559ee390f75