init
This commit is contained in:
+30
@@ -0,0 +1,30 @@
|
|||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
machine:
|
||||||
|
image: debian:unstable
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: |
|
||||||
|
sudo apt update -qq
|
||||||
|
sudo apt install -y git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev libx11-dev lib32z-dev libxml2-utils xsltproc schedtool gettext nodejs npm
|
||||||
|
npm install -g surge
|
||||||
|
|
||||||
|
export TUPLE="danio"
|
||||||
|
|
||||||
|
for i in aarch-${TUPLE}-linux aplha-${TUPLE}-linux arm-${TUPLE}-eabi arc-${TUPLE}-linux c6x-${TUPLE}-linux h8300-${TUPLE}-elf parisc64-${TUPLE}-linux parisc-${TUPLE}-linux i386-${TUPLE}-linux -${TUPLE}-linux ia64-${TUPLE}-linux m68k-${TUPLE}-linux microblaze-${TUPLE}-linux mips64-${TUPLE}-linux mips-${TUPLE}-linux nios2-${TUPLE}-elf powerpc64-${TUPLE}-linux powerpc64-${TUPLE}-linux s390-${TUPLE}-linux sh2-${TUPLE}-linux sh4-${TUPLE}-linux riscv32-${TUPLE}-linux riscv64-${TUPLE}-linux sparc-${TUPLE}-linux sparc64-${TUPLE}-linux x86_64-${TUPLE}-linux xtensa-${TUPLE}-linux nds32le-${TUPLE}-linux or1k-${TUPLE}-linux hexagon-${TUPLE}-linux am33_2.0-${TUPLE}-linux bfin-${TUPLE}-uclinux crisv32-${TUPLE}-linux frv-${TUPLE}-linux m32r-${TUPLE}-linux tilepro-${TUPLE}-linux tilegx-${TUPLE}-linux; do
|
||||||
|
if [ -e .error ]; then
|
||||||
|
. ./.error
|
||||||
|
echo "error detected @ ${STAGE} !"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
sudo ./danio_gcc.sh ${i}
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
(cd out; ls | (echo '<html><center><body>'; sed 's/^.*/<a href="&">&<\/a><br\/>/'; echo '</body></center></html>') > index.html)
|
||||||
|
|
||||||
|
deployment:
|
||||||
|
production:
|
||||||
|
branch: master
|
||||||
|
commands:
|
||||||
|
- surge --project ./out --domain danio-gcc.surge.sh
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
export TARGET="${1}"
|
||||||
|
export PREFIX="`pwd`/rel-bin/${TARGET}"
|
||||||
|
export PATH="${PREFIX}/bin:${PATH}"
|
||||||
|
export OUT="`pwd`/out"
|
||||||
|
|
||||||
|
#### JEŚLI BĘDĄ NOWE WERSJE BINUTILS'A i GCC PROSZĘ ZMIENIĆ NUMER!!!
|
||||||
|
export binutils_version="2.31" #TU ZMIENIAMY!
|
||||||
|
export version="LATEST-9" #TU ZMIENIAMY!
|
||||||
|
export nproc=$(( `grep -c "processor" /proc/cpuinfo` * 2 ))
|
||||||
|
export binutils_ext="tar.xz" #TU POD ŻADNYM POZOREM NIE ZMIENIAJ TYPU!!!!!
|
||||||
|
####
|
||||||
|
|
||||||
|
if ! command -v lftp >/dev/null; then
|
||||||
|
clear
|
||||||
|
printf "\n Nie znaleziono \"lftp\"!\n Prosze zanistaluj go na swoim obecnym systemie!\n\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${REMOVE}" == "1" ]; then
|
||||||
|
rm -rf binutils-* build-* ${version} gcc-* */* zen-kernel-*
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
if [ ! -e binutils-${binutils_version}${binutils_ext} ]; then
|
||||||
|
wget -c http://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.${binutils_ext}
|
||||||
|
fi
|
||||||
|
if [ ! -d binutils-${binutils_version} ]; then
|
||||||
|
tar -xf binutils-*.*
|
||||||
|
fi
|
||||||
|
) || exit 1
|
||||||
|
|
||||||
|
mkdir -pv build-binutils
|
||||||
|
cd build-binutils
|
||||||
|
../binutils-*/configure --target="${TARGET}" --prefix="${PREFIX}" --disable-nls --disable-werror --with-sysroot="${PREFIX}" --enable-obsolete
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
if ! (
|
||||||
|
make -C build-binutils -j${nproc}
|
||||||
|
make -C build-binutils -j${nproc} install
|
||||||
|
)
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
if [ ! -e */gcc-*.* ]; then
|
||||||
|
lftp -c "open ftp://ftp.fu-berlin.de/unix/languages/gcc/snapshots ; mirror ${version}"
|
||||||
|
fi
|
||||||
|
if [ ! -d gcc-* ]; then
|
||||||
|
tar -xf */gcc-*.*
|
||||||
|
fi
|
||||||
|
) || exit 1
|
||||||
|
|
||||||
|
(cd gcc-*; contrib/download_prerequisites)
|
||||||
|
|
||||||
|
mkdir -pv build-gcc
|
||||||
|
|
||||||
|
if ! (
|
||||||
|
cd build-gcc
|
||||||
|
../gcc-*/configure --target=${TARGET} --prefix=${PREFIX} --disable-lto --disable-nls --disable-werror --enable-languages=all --enable-multilib --enable-multiarch --with-pkgversion="*DANiO* T00LCHAIN" --with-system-zlib --enable-obsolete --with-sysroot="${PREFIX}"
|
||||||
|
cd ..
|
||||||
|
)
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
maybe_try_this()
|
||||||
|
{
|
||||||
|
make -C build-gcc all-gcc -j${nproc} || return 1
|
||||||
|
make -C build-gcc all-target-libgcc -j${nproc} || return 1
|
||||||
|
make -C build-gcc install-gcc -j${nproc} || return 1
|
||||||
|
make -C build-gcc install-target-libgcc -j${nproc} || return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
if [ ! -d zen-kernel-testing ]; then
|
||||||
|
wget -c http://github.com/zen-kernel/zen-kernel/archive/testing.tar.gz -O - | tar -xzvf -
|
||||||
|
fi
|
||||||
|
make -C zen-kernel-testing headers_install ARCH=`echo ${TARGET} | cut -f1 -d"-" | sed -e s/i.86/x86/ -e s/x86_64/x86/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/ -e s/parisc64/parisc/ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ -e s/riscv.*/riscv/` INSTALL_HDR_PATH="${PREFIX}"
|
||||||
|
make -C build-gcc -j${nproc} || maybe_try_this
|
||||||
|
make -C build-gcc install -j${nproc} || maybe_try_this
|
||||||
|
)
|
||||||
|
then
|
||||||
|
find ${PREFIX} | xargs file | grep "ELF" | grep "executable" | cut -f 1 -d ":" | xargs strip -S 2>/dev/null
|
||||||
|
mkdir -pv out
|
||||||
|
(cd ${PREFIX}; tar -cJf "${OUT}/${TARGET}-`date +"%d-%m-%Y"`.txz" .)
|
||||||
|
rm -rf build-*
|
||||||
|
#printf "\n POPRAWNIE ZBUDOWANO GCC DLA ${TARGET}!\n\n"
|
||||||
|
else
|
||||||
|
echo "STAGE=${TARGET}" > .error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user