fix rust builds, add ldd

Signed-off-by: PeroSar <perosar1111@gmail.com>
This commit is contained in:
PeroSar 2022-05-06 23:49:12 +05:30
parent 3ee39789b0
commit 5ff9af7795
Signed by: PeroSar
GPG Key ID: 5C2D258445DA8B58
3 changed files with 29 additions and 0 deletions

View File

@ -16,6 +16,7 @@ steps:
- bash emerald-binutils.sh && rm -rf build
- bash emerald-sysroot.sh
- bash emerald-gcc.sh
- bash emerald-post-gcc-build.sh
- env XZ_OPT="-9 -T0" tar -C /tmp -cJf aarch64-linux-android-emerald.tar.xz aarch64-linux-android-emerald
- bash emerald-get-relver.sh

14
bin/aarch64-linux-android-ldd Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env sh
USAGE="$(basename "$0") (Emerald GCC)
Usage: ldd FILE..."
BIN_PATH=$(dirname "$(realpath "$0")")
OBJDUMP="$BIN_PATH/aarch64-linux-android-objdump"
case $# in
0) echo "$USAGE" ;;
1) $OBJDUMP -p -- "$@" | grep NEEDED | cut -d' ' -f18 ;;
*) $OBJDUMP -p -- "$@" | grep 'NEEDED\|file format' | cut -d' ' -f1,18 ;;
esac

14
emerald-post-gcc-build.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
source "$EMERALD_SCRIPT_DIR"/common.sh
cd "$PREFIX"
# Fix rust builds
echo "INPUT(-lc)" > lib/gcc/aarch64-linux-android/11.3.0/libgcc.a
# Install helper scripts
install -Dm755 -t bin "$EMERALD_SCRIPT_DIR"/bin/*