Browse Source

Ship libgcc in ndk-sysroot and ndk-multilib (#2146)

android-5
tomty89 7 years ago
committed by Fredrik Fornwall
parent
commit
f47cef0c83
  1. 2
      packages/ddrescue/build.sh
  2. 16
      packages/libgcc/build.sh
  3. 3
      packages/libllvm/build.sh
  4. 8
      packages/ndk-multilib/build.sh
  5. 13
      packages/ndk-sysroot/build.sh

2
packages/ddrescue/build.sh

@ -1,6 +1,6 @@
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/ddrescue/
TERMUX_PKG_DESCRIPTION="GNU data recovery tool"
TERMUX_PKG_VERSION=1.22
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://mirror.switch.ch/ftp/mirror/gnu/ddrescue/ddrescue-${TERMUX_PKG_VERSION}.tar.lz
TERMUX_PKG_SHA256=09857b2e8074813ac19da5d262890f722e5f7900e521a4c60354cef95eea10a7
TERMUX_PKG_DEPENDS="libgcc"

16
packages/libgcc/build.sh

@ -1,16 +0,0 @@
TERMUX_PKG_HOMEPAGE=https://gcc.gnu.org/onlinedocs/gccint/Libgcc.html
TERMUX_PKG_DESCRIPTION="GCC low-level runtime library"
TERMUX_PKG_VERSION=4.9
TERMUX_PKG_REVISION=1
TERMUX_PKG_KEEP_STATIC_LIBRARIES="true"
termux_step_extract_into_massagedir () {
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
local LIBGCC_PATH=lib/gcc/$TERMUX_HOST_PLATFORM/4.9.x
if [ $TERMUX_ARCH = "arm" ]; then
LIBGCC_PATH+="/armv7-a"
fi
LIBGCC_PATH+="/libgcc.a"
cp $TERMUX_STANDALONE_TOOLCHAIN/$LIBGCC_PATH $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
}

3
packages/libllvm/build.sh

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://clang.llvm.org/
TERMUX_PKG_DESCRIPTION="Modular compiler and toolchain technologies library"
_PKG_MAJOR_VERSION=5.0
TERMUX_PKG_VERSION=${_PKG_MAJOR_VERSION}.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=5fa7489fc0225b11821cab0362f5813a05f2bcf2533e8a4ea9c9c860168807b0
TERMUX_PKG_SRCURL=https://releases.llvm.org/${TERMUX_PKG_VERSION}/llvm-${TERMUX_PKG_VERSION}.src.tar.xz
TERMUX_PKG_HOSTBUILD=true
@ -26,7 +27,7 @@ share/man/man1/scan-build.1
share/scan-build
share/scan-view
"
TERMUX_PKG_DEPENDS="binutils, ncurses, ndk-sysroot, ndk-stl, libgcc"
TERMUX_PKG_DEPENDS="binutils, ncurses, ndk-sysroot, ndk-stl"
# Replace gcc since gcc is deprecated by google on android and is not maintained upstream.
# Conflict with clang versions earlier than 3.9.1-3 since they bundled llvm.
TERMUX_PKG_CONFLICTS="gcc, clang (<< 3.9.1-3)"

8
packages/ndk-multilib/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html
TERMUX_PKG_DESCRIPTION="Multilib binaries for cross-compilation"
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
TERMUX_PKG_REVISION=2
TERMUX_PKG_REVISION=3
TERMUX_PKG_NO_DEVELSPLIT=yes
TERMUX_PKG_KEEP_STATIC_LIBRARIES="true"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
@ -23,7 +23,11 @@ prepare_libs () {
LIBATOMIC=$NDK/toolchains/${NDK_SUFFIX}-*/prebuilt/linux-*/${SUFFIX}/lib
if [ $ARCH = arm64 ]; then LIBATOMIC+="64"; fi
if [ $ARCH = "arm" ]; then LIBATOMIC+="/armv7-a"; fi
cp $LIBATOMIC/libatomic.a $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/$SUFFIX/lib/libatomic.a
cp $LIBATOMIC/libatomic.a $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/$SUFFIX/lib/
LIBGCC=$NDK/toolchains/${NDK_SUFFIX}-*/prebuilt/linux-*/lib/gcc/${SUFFIX}/4.9.x
if [ $ARCH = "arm" ]; then LIBGCC+="/armv7-a"; fi
cp $LIBGCC/libgcc.a $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/$SUFFIX/lib/
}
termux_step_extract_into_massagedir () {

13
packages/ndk-sysroot/build.sh

@ -1,14 +1,14 @@
TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html
TERMUX_PKG_DESCRIPTION="System header and library files from the Android NDK needed for compiling C programs"
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
TERMUX_PKG_REVISION=6
TERMUX_PKG_REVISION=7
TERMUX_PKG_NO_DEVELSPLIT=yes
# Depend on libandroid-support-dev so that iconv.h and libintl.h are available:
TERMUX_PKG_DEPENDS="libandroid-support-dev"
TERMUX_PKG_KEEP_STATIC_LIBRARIES="true"
# This package has taken over <pty.h> from the previous libutil-dev:
TERMUX_PKG_CONFLICTS="libutil-dev"
TERMUX_PKG_REPLACES="libutil-dev"
TERMUX_PKG_CONFLICTS="libutil-dev libgcc"
TERMUX_PKG_REPLACES="libutil-dev libgcc"
termux_step_extract_into_massagedir () {
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/pkgconfig \
@ -33,7 +33,12 @@ termux_step_extract_into_massagedir () {
if [ $TERMUX_ARCH_BITS = 64 ]; then LIBATOMIC_PATH+="64"; fi
if [ $TERMUX_ARCH = "arm" ]; then LIBATOMIC_PATH+="/armv7-a"; fi
LIBATOMIC_PATH+="/libatomic.a"
cp $LIBATOMIC_PATH $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/libatomic.a
cp $LIBATOMIC_PATH $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib/
local LIBGCC_PATH=$TERMUX_STANDALONE_TOOLCHAIN/lib/gcc/$TERMUX_HOST_PLATFORM/4.9.x
if [ $TERMUX_ARCH = "arm" ]; then LIBGCC_PATH+="/armv7-a" fi
LIBGCC_PATH+="/libgcc.a"
cp $LIBGCC_PATH $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:

Loading…
Cancel
Save