]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
scripts/sanitizer-env.sh: support new clang 19 DSO
authorEmil Velikov <emil.l.velikov@gmail.com>
Fri, 1 Nov 2024 13:32:07 +0000 (13:32 +0000)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Thu, 7 Nov 2024 17:07:41 +0000 (11:07 -0600)
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 <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/219
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
scripts/sanitizer-env.sh

index f5a42cf450906d88f916f42f266e76ea20b980cb..2fbebc55d529702bfbbe23e66ef7a1d3c96bba62 100755 (executable)
@@ -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