Compare commits

...

5 Commits

Author SHA1 Message Date
PeroSar 917494dda3 back to tildegit 2023-09-24 10:09:04 +05:30
PeroSar 8ac0281347
Test build 2
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-04 14:08:26 +05:30
PeroSar 4866826814
emerald-get-relver: Fix for BusyBox grep
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-04 11:10:26 +05:30
PeroSar d88e689c3a
gcc: Use prebuilts from alpine repo to reduce compile time
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-04 10:50:01 +05:30
PeroSar 9fee6a0d25
emerald-post-gcc-build: Fix for BusyBox grep
Signed-off-by: PeroSar <perosar1111@gmail.com>
2022-06-04 10:35:26 +05:30
7 changed files with 22 additions and 24 deletions

View File

@ -11,22 +11,11 @@ steps:
- name: build
image: alpine:latest
commands:
- apk add gcc g++ texinfo make curl xz bash patch
- apk add g++ texinfo make curl xz xz-dev bash patch isl-dev gmp-dev mpfr-dev libgomp mpc1-dev clang llvm libunwind-static compiler-rt lld
- bash binutils-is-llvm.sh
- bash emerald-binutils.sh
- 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
- name: release
image: tystuyfzand/drone-gitea-release
settings:
gitea_server: https://git.envs.net
tag_file: tag.txt
title_file: title.txt
files: [ 'aarch64-linux-android-emerald.tar.xz' ]
environment:
PLUGIN_API_KEY:
from_secret: gitea_token
- curl -F file=@aarch64-linux-android-emerald.tar.xz 0x0.st

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.envs.net)](https://drone.envs.netg/perosar/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.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://git.envs.net/perosar/emerald-gcc/releases)
- Get tarball from latest [gitea release](https://tildegit.org/perosar/emerald-gcc/releases)
- Extract
```bash

9
binutils-is-llvm.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
cd /usr/bin
for b in addr2line ar as dwp nm objcopy objdump ranlib readelf size strings strip c++filt; do
ln -sf llvm-"${b/+/x}" "$b"
done
ln -sf lld ld

View File

@ -7,15 +7,17 @@ export EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
export EMERALD_BUILD_DIR="$EMERALD_SCRIPT_DIR"/build
export EMERALD_DL_DIR="$EMERALD_SCRIPT_DIR"/dl
export CC=clang
export CXX=clang++
export CFLAGS="-O3"
export CPPFLAGS="$CFLAGS"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-s -w -static --static -static-libgcc -static-libstdc++"
export LDFLAGS="-llzma -s -w -static --static -rtlib=compiler-rt -unwindlib=libunwind"
export CFLAGS_FOR_TARGET="$CFLAGS"
export CPPFLAGS_FOR_TARGET="$CFLAGS"
export CXXFLAGS_FOR_TARGET="$CFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
export LDFLAGS_FOR_TARGET="-s -w"
download() {
if [ $# != 3 ]; then

View File

@ -24,8 +24,6 @@ cd "$EMERALD_BUILD_DIR"/gcc-"$GCC_VER"
# Apply patches
find "$EMERALD_SCRIPT_DIR"/patches/gcc/"$GCC_VER" -type f -name '*.patch' -exec patch -p0 -i {} \;
./contrib/download_prerequisites
# Its suggested to run configure from a seperate directory
mkdir -vp build && cd "$_"
@ -38,7 +36,7 @@ mkdir -vp build && cd "$_"
--disable-libsanitizer --disable-nls \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --disable-libstdcxx-pch \
--with-bugurl='https://git.envs.net/PeroSar/emerald-gcc/issues'
--with-bugurl='https://tildegit.org/PeroSar/emerald-gcc/issues'
# Building
make -j10

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
GCC_VER=$(grep -P -m1 '^GCC_VER=' emerald-gcc.sh | cut -d= -f2)
BINUTILS_VER=$(grep -P -m1 '^BINUTILS_VER=' emerald-binutils.sh | cut -d= -f2)
GCC_VER=$(grep -m1 '^GCC_VER=' emerald-gcc.sh | cut -d= -f2)
BINUTILS_VER=$(grep -m1 '^BINUTILS_VER=' emerald-binutils.sh | cut -d= -f2)
echo "emerald: GCC v$GCC_VER, Binutils v$BINUTILS_VER" > title.txt
echo "$GCC_VER" > tag.txt

View File

@ -3,7 +3,7 @@
set -euo pipefail
EMERALD_SCRIPT_DIR=$(dirname "$(realpath "$0")")
GCC_VER=$(grep -P -m1 '^GCC_VER=' emerald-gcc.sh | cut -d= -f2)
GCC_VER=$(grep -m1 '^GCC_VER=' "$EMERALD_SCRIPT_DIR"/emerald-gcc.sh | cut -d= -f2)
source "$EMERALD_SCRIPT_DIR"/common.sh
AR=$PREFIX/$TARGET/bin/ar