scripts: start_build: create libpthread and librt as well

Their functionality is included in libc, but some packages anyways
searches for libpthread.so and librt.so.  Provide these files so that
such configure steps succeed.
This commit is contained in:
Henrik Grimler 2023-02-08 14:51:27 +01:00 committed by Henrik Grimler
parent 9063e5919f
commit af18f1dac0
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
1 changed files with 9 additions and 6 deletions

View File

@ -104,10 +104,13 @@ termux_step_start_build() {
chmod u+x "$TERMUX_ELF_CLEANER"
fi
# On Android 7, libutil functionality is provided by libc.
# But many programs still may search for libutil.
if [ ! -f $TERMUX_PREFIX/lib/libutil.so ]; then
mkdir -p "$TERMUX_PREFIX/lib"
echo 'INPUT(-lc)' > $TERMUX_PREFIX/lib/libutil.so
fi
# Some packages search for libutil, libpthread and librt even
# though this functionality is provided by libc. Provide
# library stubs so that such configure checks succeed.
mkdir -p "$TERMUX_PREFIX/lib"
for lib in libutil.so libpthread.so librt.so; do
if [ ! -f $TERMUX_PREFIX/lib/$lib ]; then
echo 'INPUT(-lc)' > $TERMUX_PREFIX/lib/$lib
fi
done
}