Compile the OS specific toolchain

This commit is contained in:
Alex
2022-12-07 17:08:15 +02:00
parent 59dfe30d64
commit 0f11f3f70c
7 changed files with 6464 additions and 9 deletions

View File

@ -4,7 +4,7 @@ export PATH := $(CROSS_DIR):$(PATH)
QEMU_VERSION = qemu-7.1.0
all: do_rep do_ep do_fex do_limine clone_all do_binutils64 do_binutils32 do_binutilsarm64 do_gcc64 do_gcc32 do_gccarm64 do_qemu
all: do_rep do_ep do_fex do_limine clone_all do_binutils64 do_binutils32 do_binutilsarm64 do_gcc64 do_gcc32 do_gccarm64 do_qemu do_prep_toolchain do_toolchain_binutils64 do_toolchain_gcc64
clean:
rm -f rep ep fex
@ -74,3 +74,28 @@ do_gccarm64:
cd build-gccarm64 && \
../gcc/configure --target=aarch64-elf --prefix="$(CROSS_DIR)" --enable-languages=c,c++ --without-headers && \
make all-gcc -j$(shell nproc) && make install-gcc -j$(shell nproc)
do_binutils64:
cd build-binutilsamd64 && \
../binutils-gdb/configure --target=amd64-elf --prefix="$(CROSS_DIR)" --with-sysroot --enable-shared --disable-werror && \
make all -j$(shell nproc) && make install
do_prep_toolchain:
mkdir -p build-toolchain-binutils
mkdir -p build-toolchain-gcc
mkdir -p toolchain-binutils-gdb
mkdir -p toolchain-gcc
cp -r binutils-gdb/* toolchain-binutils-gdb
cp -r gcc/* toolchain-gcc
cd toolchain-binutils-gdb && git apply ../toolchain-binutils-gdb.patch && cd ..
cd toolchain-gcc && git apply ../toolchain-gcc.patch && cd ..
do_toolchain_binutils64:
cd build-toolchain-binutils && \
../toolchain-binutils-gdb/configure --target=x86_64-fennix --prefix="$(CROSS_DIR)/toolchain" --with-sysroot --enable-shared --disable-werror && \
make all -j$(shell nproc) && make install
do_toolchain_gcc64:
cd build-toolchain-gcc && \
../toolchain-gcc/configure --target=x86_64-fennix --prefix="$(CROSS_DIR)/toolchain" --enable-languages=c,c++ --enable-shared --without-headers && \
make all-gcc -j$(shell nproc) && make install-gcc -j$(shell nproc)