kbuild: rust_is_available: fix version check when CC has multiple arguments
[platform/kernel/linux-starfive.git] / scripts / rust_is_available.sh
index f43a010..0c9be43 100755 (executable)
@@ -113,10 +113,10 @@ fi
 #
 # In the future, we might be able to perform a full version check, see
 # https://github.com/rust-lang/rust-bindgen/issues/2138.
-cc_name=$($(dirname $0)/cc-version.sh "$CC" | cut -f1 -d' ')
+cc_name=$($(dirname $0)/cc-version.sh $CC | cut -f1 -d' ')
 if [ "$cc_name" = Clang ]; then
        clang_version=$( \
-               LC_ALL=C "$CC" --version 2>/dev/null \
+               LC_ALL=C $CC --version 2>/dev/null \
                        | sed -nE '1s:.*version ([0-9]+\.[0-9]+\.[0-9]+).*:\1:p'
        )
        if [ "$clang_version" != "$bindgen_libclang_version" ]; then