emerald-post-gcc-build: Fix static linking
Previously, building with cargo was fixed, but static linking was broken Signed-off-by: PeroSar <perosar1111@gmail.com>
This commit is contained in:
parent
f04103c117
commit
b194ea6e98
|
@ -5,11 +5,17 @@ set -euo pipefail
|
|||
EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
||||
GCC_VER=$(grep -P -m1 '^GCC_VER=' emerald-gcc.sh | cut -d= -f2)
|
||||
source "$EMERALD_SCRIPT_DIR"/common.sh
|
||||
AR=$PREFIX/$TARGET/bin/ar
|
||||
|
||||
cd "$PREFIX"
|
||||
|
||||
# Fix rust builds
|
||||
echo "INPUT(-lgcc_eh)" > lib/gcc/aarch64-linux-android/"$GCC_VER"/libgcc.a
|
||||
(
|
||||
cd lib/gcc/aarch64-linux-android/"$GCC_VER"/
|
||||
LIBGCC_FILENAME=libgcc_$(base64 <<< $RANDOM$RANDOM | sed 's|=||g').a
|
||||
mv libgcc.a "$LIBGCC_FILENAME"
|
||||
$AR crsT libgcc.a "$LIBGCC_FILENAME" libgcc_eh.a
|
||||
)
|
||||
|
||||
# Install helper scripts
|
||||
install -Dm755 -t bin "$EMERALD_SCRIPT_DIR"/bin/*
|
||||
|
|
Loading…
Reference in New Issue