From: Emil Velikov Date: Fri, 1 Nov 2024 13:32:07 +0000 (+0000) Subject: scripts/sanitizer-env.sh: support new clang 19 DSO X-Git-Tag: v34~143 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7686797fc0ed65a56e025773b313641f2bf709b;p=thirdparty%2Fkmod.git scripts/sanitizer-env.sh: support new clang 19 DSO Seemingly with version 19, the CPU arch was dropped from the DSO name. Try that and fallback to the old one, as applicable. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/219 Signed-off-by: Lucas De Marchi --- diff --git a/scripts/sanitizer-env.sh b/scripts/sanitizer-env.sh index f5a42cf4..2fbebc55 100755 --- a/scripts/sanitizer-env.sh +++ b/scripts/sanitizer-env.sh @@ -5,7 +5,11 @@ if [[ ${CC-} == *gcc* ]]; then OUR_PRELOAD=$("$CC" -print-file-name=libasan.so) elif [[ ${CC-} == *clang* ]]; then - OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan-x86_64.so) + # With v19, the library lacks the CPU arch in its name + OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan.so) + if ! test -f "$OUR_PRELOAD"; then + OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan-x86_64.so) + fi else cat <<- EOF >&2