From 2e02aa89dfc823f26609d71d28362e19d6cc21b8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 13 Jul 2024 23:45:44 +0200 Subject: [PATCH] try fix 2 --- _build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/_build.sh b/_build.sh index 09f602ddb..d56851024 100755 --- a/_build.sh +++ b/_build.sh @@ -1442,13 +1442,18 @@ build_single_target() { elif [ -d 'my-pkg/usr/lib/clang' ]; then # cross # If we have the target CPU's clang-rt package installed, use it: ccrtdir="$(find -L \ - "$(pwd)/my-pkg/usr/lib/clang" -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1 || true)" # ./my-pkg/usr/lib/clang/15/lib/linux + "$(pwd)/my-pkg/usr/lib/clang" -mindepth 1 -maxdepth 1 -type d | sort | tail -n 1 || true)" # ./my-pkg/usr/lib/clang/15/lib/linux -> ./my-pkg/usr/lib/clang/18/lib/${_machine}-unknown-linux-gnu if [ -z "${ccrtdir}" ]; then >&2 echo '! Error: Failed to detect cross-clang-rt env root.' exit 1 fi - ccrtdir+='/lib/linux' - ccrtlib="${ccrtdir}/libclang_rt.builtins-${_machine}.a" + if [ -d "${ccrtdir}/lib/${_machine}-unknown-linux-gnu" ]; then # new dir layout seen on 2024-07-13 + ccrtdir+="/lib/${_machine}-unknown-linux-gnu" + ccrtlib="${ccrtdir}/libclang_rt.builtins.a" + else + ccrtdir+='/lib/linux' + ccrtlib="${ccrtdir}/libclang_rt.builtins-${_machine}.a" + fi ccrtlib="$(basename "${ccrtlib}" | cut -c 4-)" # delete 'lib' prefix ccrtlib="-Wl,-l${ccrtlib%.*}" # clang_rt.builtins-aarch64 or gcc else # cross