$_TERMUX_TOOLCHAIN_TMPDIR/aarch64-linux-android/bin/ld
fi
+ if [ "$TERMUX_ARCH" = "arm" ]; then
+ # Linker wrapper script to add '--exclude-libs libgcc.a', see
+ # https://github.com/android-ndk/ndk/issues/379
+ # https://android-review.googlesource.com/#/c/389852/
+ local linker
+ for linker in ld ld.bfd ld.gold; do
+ local wrap_linker=$_TERMUX_TOOLCHAIN_TMPDIR/$TERMUX_HOST_PLATFORM/bin/$linker
+ local real_linker=$_TERMUX_TOOLCHAIN_TMPDIR/$TERMUX_HOST_PLATFORM/bin/$linker.real
+ cp $wrap_linker $real_linker
+ echo '#!/bin/bash' > $wrap_linker
+ echo -n '`dirname $0`/' >> $wrap_linker
+ echo -n $linker.real >> $wrap_linker
+ echo ' --exclude-libs libgcc.a "$@"' >> $wrap_linker
+ done
+ fi
+
cd $_TERMUX_TOOLCHAIN_TMPDIR/sysroot
for f in $TERMUX_SCRIPTDIR/ndk-patches/*.patch; do
fi
local _STL_LIBFILE_NAME=libc++_shared.so
- if [ ! -f $TERMUX_PREFIX/lib/libstdc++.so ] || [ `readlink $TERMUX_PREFIX/lib/libstdc++.so` != $_STL_LIBFILE_NAME ]; then
- # Setup libgnustl_shared.so in $PREFIX/lib and libstdc++.so as a symlink to it,
+ if [ ! -f $TERMUX_PREFIX/lib/libstdc++.so ]; then
+ # Setup libgnustl_shared.so in $PREFIX/lib and libstdc++.so as a link to it,
# so that other C++ using packages links to it instead of the default android
# C++ library which does not support exceptions or STL:
# https://developer.android.com/ndk/guides/cpp-support.html
cp "$_STL_LIBFILE" .
$STRIP --strip-unneeded $_STL_LIBFILE_NAME
$TERMUX_ELF_CLEANER $_STL_LIBFILE_NAME
- ln -f -s $_STL_LIBFILE_NAME libstdc++.so
+ if [ $TERMUX_ARCH = "arm" ]; then
+ # Use a linker script to get libunwind.a.
+ echo 'INPUT(-lunwind -lc++_shared)' > libstdc++.so
+ else
+ ln -f $_STL_LIBFILE_NAME libstdc++.so
+ fi
fi
export PKG_CONFIG_LIBDIR="$TERMUX_PKG_CONFIG_LIBDIR"
TERMUX_PKG_DESCRIPTION="The standard GNU Debugger that runs on many Unix-like systems and works for many programming languages"
TERMUX_PKG_DEPENDS="liblzma, libexpat, readline"
TERMUX_PKG_VERSION=8.0
+TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gdb/gdb-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=f6a24ffe4917e67014ef9273eb8b547cb96a13e5ca74895b06d683b391f3f4ee
# gdb can not build with our normal --disable-static: https://sourceware.org/bugzilla/show_bug.cgi?id=15916
TERMUX_PKG_HOMEPAGE=https://mosh.org
TERMUX_PKG_DESCRIPTION="Mobile shell that supports roaming and intelligent local echo"
TERMUX_PKG_VERSION=1.3.2
+TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=da600573dfa827d88ce114e0fed30210689381bbdcff543c931e4d6a2e851216
TERMUX_PKG_SRCURL=https://github.com/mobile-shell/mosh/releases/download/mosh-${TERMUX_PKG_VERSION}/mosh-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_FOLDERNAME=mosh-$TERMUX_PKG_VERSION