Test build with musl libc

Signed-off-by: PeroSar <perosar1111@gmail.com>
This commit is contained in:
PeroSar 2022-06-04 10:10:58 +05:30
parent ac43b015ba
commit 3ed698bc14
Signed by: PeroSar
GPG Key ID: 5C2D258445DA8B58
5 changed files with 10 additions and 11 deletions

View File

@ -9,11 +9,10 @@ trigger:
steps:
- name: build
image: ubuntu:20.04
image: alpine:latest
commands:
- apt update -yqq && apt install software-properties-common -yqq >/dev/null 2>&1 && add-apt-repository ppa:ubuntu-toolchain-r/test -y && apt install build-essential flex texinfo curl xz-utils gcc-11 g++-11 -yqq >/dev/null 2>&1
- ln -sf $(which gcc-11) $(which gcc) && ln -sf $(which g++-11) $(which g++)
- bash emerald-binutils.sh && rm -rf build
- apk add gcc g++ texinfo make curl xz bash patch
- bash emerald-binutils.sh
- bash emerald-sysroot.sh
- bash emerald-gcc.sh
- bash emerald-post-gcc-build.sh

View File

@ -3,10 +3,14 @@
TARGET=aarch64-linux-android
export PREFIX=/tmp/"$TARGET"-emerald
export EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
export EMERALD_BUILD_DIR="$EMERALD_SCRIPT_DIR"/build
export EMERALD_DL_DIR="$EMERALD_SCRIPT_DIR"/dl
export CFLAGS="-O3"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS -static-libgcc -static-libstdc++"
export LDFLAGS="-s -w"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-s -w -static --static -static-libgcc -static-libstdc++"
export CFLAGS_FOR_TARGET="$CFLAGS"
export CPPFLAGS_FOR_TARGET="$CFLAGS"

View File

@ -7,8 +7,6 @@ EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
BINUTILS_VER=2.38
BINUTILS_SHA256=e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024
EMERALD_BUILD_DIR="$EMERALD_SCRIPT_DIR"/build
EMERALD_DL_DIR="$EMERALD_SCRIPT_DIR"/dl
source "$EMERALD_SCRIPT_DIR"/common.sh
# Make sure build/dl directory exists

View File

@ -7,8 +7,6 @@ EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
GCC_VER=12.1.0
GCC_SHA256=62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b
EMERALD_BUILD_DIR="$EMERALD_SCRIPT_DIR"/build
EMERALD_DL_DIR="$EMERALD_SCRIPT_DIR"/dl
source "$EMERALD_SCRIPT_DIR"/common.sh
# Make sure build and dl directory exists

View File

@ -11,7 +11,7 @@ cd "$PREFIX"
# Fix rust builds
(
cd lib/gcc/aarch64-linux-android/"$GCC_VER"/
cd lib/gcc/"$TARGET"/"$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