ext-linux-bin/gcc/build_gcc.sh

26 lines
598 B
Bash
Raw Normal View History

2022-05-23 03:08:23 +00:00
#!/bin/bash
set -e
2022-05-23 03:08:23 +00:00
# This script is meant to make it easy to build GCC using a Docker container.
THIS=$(readlink -e $0)
USER_ID=`id -u`
GROUP_ID=`id -g`
VERSION=12.2.0
if [ ! -d gcc ]; then
git clone --depth 1 -b "releases/gcc-$VERSION" git://gcc.gnu.org/git/gcc.git
else
cd gcc
sudo git clean -fxd
git restore :/
cd ..
fi
2022-05-23 03:08:23 +00:00
mkdir -p gcc-$VERSION | true
2022-05-23 03:08:23 +00:00
docker run -v $(pwd):/src -w /src -u root -t yuzuemu/build-environments:linux-fresh /bin/bash /src/docker.sh $VERSION
2022-05-23 03:08:23 +00:00
cp -v $THIS gcc-$VERSION/
tar cv gcc-$VERSION | xz -T0 -c | split --bytes=90MB - gcc-$VERSION.tar.xz.