Browse Source

build-package.sh: create dummy libutil.so which links to libc

Replace libutil.so with linker script so we don't have to patch
each program that tries to link with libutil.so.
emacs-27
Leonid Plyushch 6 years ago
parent
commit
02e60c373c
  1. 1
      scripts/build/termux_step_extract_into_massagedir.sh
  2. 7
      scripts/build/termux_step_setup_toolchain.sh

1
scripts/build/termux_step_extract_into_massagedir.sh

@ -5,6 +5,7 @@ termux_step_extract_into_massagedir() {
cd $TERMUX_PREFIX
tar -N "$TERMUX_BUILD_TS_FILE" \
--exclude='lib/libc++_shared.so' --exclude='lib/libstdc++.so' \
--exclude='lib/libutil.so' \
-czf "$TARBALL_ORIG" .
# Extract tar in order to massage it

7
scripts/build/termux_step_setup_toolchain.sh

@ -155,6 +155,13 @@ termux_step_setup_toolchain() {
mv $_TERMUX_TOOLCHAIN_TMPDIR $TERMUX_STANDALONE_TOOLCHAIN
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
local _STL_LIBFILE_NAME=libc++_shared.so
if [ ! -f $TERMUX_PREFIX/lib/libstdc++.so ]; then
# Setup libc++_shared.so in $PREFIX/lib and libstdc++.so as a link to it,

Loading…
Cancel
Save