Toolchain: Do not overwrite libraries with stubs when rebuilding LLVM

We erroneously appended ".so" after the base name for the library,
so we ended up checking for the existence of e.g. `libc.so.so`,
which obviously didn't exist, so we overwrote the existing libraries
when we rebuilt the toolchain.
This commit is contained in:
Daniel Bertalan 2022-01-07 19:10:10 +01:00 committed by Ali Mohammad Pur
parent b3dbf204fc
commit 43008267b2
Notes: sideshowbarker 2024-07-17 21:16:20 +09:00

View file

@ -231,7 +231,7 @@ for arch in $USERLAND_ARCHS; do
mkdir -p Root/usr/lib/
for lib in "$DIR/Stubs/${arch}clang/"*".so"; do
lib_name=$(basename "$lib")
[ ! -f "Root/usr/lib/${lib_name}.so" ] && cp "$lib" "Root/usr/lib/${lib_name}"
[ ! -f "Root/usr/lib/${lib_name}" ] && cp "$lib" "Root/usr/lib/${lib_name}"
done
popd
done