Добавлен скрипт сборки SDK

This commit is contained in:
Aren Elchinyan 2023-11-15 19:07:50 +03:00
parent b0c33f7f2e
commit 503e5f73f3
2 changed files with 30 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ limine/
ovmf/
iso_root/
output/
sdk/
*.so
*.o
*.ko

29
scripts/build_sdk.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
mkdir -p sdk
cd sdk
echo "Updating..."
sudo apt-get update
sudo apt-get -y install build-essential g++ make bison flex texinfo libgmp-dev libmpc-dev libmpfr-dev libisl-dev
if [ ! -d "gcc-12.3.0" ]; then
echo "Installing gcc..."
wget https://ftp.gnu.org/gnu/gcc/gcc-12.3.0/gcc-12.3.0.tar.xz
tar -xf gcc-12.3.0.tar.xz
fi
cd gcc-12.3.0/
echo "Configure..."
contrib/download_prerequisites
mkdir -p build
cd build
pwd
../configure --target=x86_64-elf --prefix=$PWD/cross --disable-nls --enable-languages=c --without-headers
echo "Build GCC..."
make all-gcc -j$(nproc)
echo "Build all-target-libgcc..."
make all-target-libgcc -j$(nproc)
echo "install-gcc..."
make install-gcc
echo "install-target-libgcc..."
make install-target-libgcc