From 503e5f73f31761bf34c78673202cdd6f41ce24ee Mon Sep 17 00:00:00 2001 From: Aren Elchinyan Date: Wed, 15 Nov 2023 19:07:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=20=D1=81=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=D0=BA=D0=B8=20SDK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + scripts/build_sdk.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 scripts/build_sdk.sh diff --git a/.gitignore b/.gitignore index 60dcba5..c68fb30 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ limine/ ovmf/ iso_root/ output/ +sdk/ *.so *.o *.ko diff --git a/scripts/build_sdk.sh b/scripts/build_sdk.sh new file mode 100644 index 0000000..f7a5a56 --- /dev/null +++ b/scripts/build_sdk.sh @@ -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 \ No newline at end of file