fix for arm

This commit is contained in:
its-pointless 2019-02-26 09:13:17 +11:00 committed by Leonid Pliushch
parent 067f4c0dca
commit 032ed6fb15

View File

@ -31,16 +31,18 @@ termux_step_extract_into_massagedir() {
local LIBGCC_PATH=$TERMUX_STANDALONE_TOOLCHAIN/lib/gcc/$TERMUX_HOST_PLATFORM/4.9.x
if [ $TERMUX_ARCH = "arm" ]; then LIBGCC_PATH+="/armv7-a"; fi
cp $LIBGCC_PATH/* $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
cp $LIBGCC_PATH/* -r $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/$TERMUX_PKG_API_LEVEL/libcompiler_rt-extras.a $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
# librt and libpthread are built into libc on android, so setup them as symlinks
# to libc for compatibility with programs that users try to build:
local _SYSTEM_LIBDIR=/system/lib64
if [ $TERMUX_ARCH_BITS = 32 ]; then _SYSTEM_LIBDIR=/system/lib; fi
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib
cd $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib
if [ $TERMUX_ARCH = "arm" ]; then
rm thumb -rf
cp $TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/libunwind.a .
fi
ln -f -s $_SYSTEM_LIBDIR/libc.so librt.so
ln -f -s $_SYSTEM_LIBDIR/libc.so libpthread.so
}