Compare commits

...

2 Commits

Author SHA1 Message Date
PeroSar 3ed698bc14
Test build with musl libc
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-04 10:10:58 +05:30
PeroSar ac43b015ba
Prepare for env git migration
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-03 23:00:30 +05:30
6 changed files with 16 additions and 17 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
@ -24,7 +23,7 @@ steps:
- name: release
image: tystuyfzand/drone-gitea-release
settings:
gitea_server: https://tildegit.org
gitea_server: https://git.envs.net
tag_file: tag.txt
title_file: title.txt
files: [ 'aarch64-linux-android-emerald.tar.xz' ]

View File

@ -1,6 +1,6 @@
# Emerald GCC
[![Drone CI](https://img.shields.io/drone/build/PeroSar/emerald-gcc?logo=drone&logoColor=blue&server=https%3A%2F%2Fdrone.tildegit.org)](https://drone.tildegit.org/PeroSar/emerald-gcc)
[![Drone CI](https://img.shields.io/drone/build/perosar/emerald-gcc?logo=drone&logoColor=blue&server=https%3A%2F%2Fdrone.envs.net)](https://drone.envs.netg/perosar/emerald-gcc)
## About
@ -16,7 +16,7 @@ Some projects still require GCC for building.
## How to use
- Get tarball from latest [gitea release](https://tildegit.org/PeroSar/emerald-gcc/releases)
- Get tarball from latest [gitea release](https://git.envs.net/perosar/emerald-gcc/releases)
- Extract
```bash

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
@ -32,5 +30,5 @@ mkdir -vp build && cd "$_"
--enable-plugins --disable-nls
# Building
make -j4
make -j10
make install -j1

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
@ -40,9 +38,9 @@ mkdir -vp build && cd "$_"
--disable-libsanitizer --disable-nls \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --disable-libstdcxx-pch \
--with-bugurl='https://tildegit.org/PeroSar/emerald-gcc/issues'
--with-bugurl='https://git.envs.net/PeroSar/emerald-gcc/issues'
# Building
make -j4
make -j10
export PATH="$PREFIX/bin:$PATH"
make install-strip -j1

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