diff --git a/config/dev-cross-i386 b/config/dev-cross-i386 index 6be9842a..3225901b 100755 --- a/config/dev-cross-i386 +++ b/config/dev-cross-i386 @@ -8,7 +8,7 @@ if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi ARCH='i386' HOST="$ARCH-elf" PREFIX="$REPO/dest/dev-cross-$ARCH" -CROSS="$REPO/vendor/cross/bin/$HOST" +CROSS="$REPO/vendor/cross/root/bin/$HOST" export AR="$CROSS-ar" export CC="$CROSS-gcc" diff --git a/config/dev-cross-riscv64 b/config/dev-cross-riscv64 index 1be2b1ab..a3dc786c 100755 --- a/config/dev-cross-riscv64 +++ b/config/dev-cross-riscv64 @@ -8,7 +8,7 @@ if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi ARCH='riscv64' HOST="$ARCH-elf" PREFIX="$REPO/dest/dev-cross-$ARCH" -CROSS="$REPO/vendor/cross/bin/$HOST" +CROSS="$REPO/vendor/cross/root/bin/$HOST" export AR="$CROSS-ar" export CC="$CROSS-gcc" diff --git a/config/dev-cross-x86_64 b/config/dev-cross-x86_64 index 09ce8727..bb97b56d 100755 --- a/config/dev-cross-x86_64 +++ b/config/dev-cross-x86_64 @@ -8,7 +8,7 @@ if [ -f "$REPO/Makefile" ]; then make -C "$REPO" distclean; fi ARCH='x86_64' HOST="$ARCH-elf" PREFIX="$REPO/dest/dev-cross-$ARCH" -CROSS="$REPO/vendor/cross/bin/$HOST" +CROSS="$REPO/vendor/cross/root/bin/$HOST" export AR="$CROSS-ar" export CC="$CROSS-gcc" diff --git a/examples/arch-riscv64-min/Makefile b/examples/arch-riscv64-min/Makefile index 67513564..5c1e191f 100644 --- a/examples/arch-riscv64-min/Makefile +++ b/examples/arch-riscv64-min/Makefile @@ -1,6 +1,6 @@ all: run -CCPREFIX = ../../vendor/cross/bin/riscv64-elf- +CCPREFIX = ../../vendor/cross/root/bin/riscv64-elf- AS = $(CCPREFIX)as CC = $(CCPREFIX)gcc diff --git a/examples/bootloader-multiboot2-grub/Makefile b/examples/bootloader-multiboot2-grub/Makefile index c7c5cc06..4cf708f8 100644 --- a/examples/bootloader-multiboot2-grub/Makefile +++ b/examples/bootloader-multiboot2-grub/Makefile @@ -1,6 +1,6 @@ all: test -CCPREFIX = ../../vendor/cross/bin/i386-elf- +CCPREFIX = ../../vendor/cross/root/bin/i386-elf- AS = $(CCPREFIX)as CC = $(CCPREFIX)gcc diff --git a/examples/bootloader-multiboot2-limine/Makefile b/examples/bootloader-multiboot2-limine/Makefile index c0a94914..043f07ef 100644 --- a/examples/bootloader-multiboot2-limine/Makefile +++ b/examples/bootloader-multiboot2-limine/Makefile @@ -1,6 +1,6 @@ all: test -CCPREFIX = ../../vendor/cross/bin/i386-elf- +CCPREFIX = ../../vendor/cross/root/bin/i386-elf- AS = $(CCPREFIX)as CC = $(CCPREFIX)gcc diff --git a/examples/bootloader-stivale2-limine/Makefile b/examples/bootloader-stivale2-limine/Makefile index b3ecf641..e467e169 100644 --- a/examples/bootloader-stivale2-limine/Makefile +++ b/examples/bootloader-stivale2-limine/Makefile @@ -1,6 +1,6 @@ all: test -CCPREFIX = ../../vendor/cross/bin/x86_64-elf- +CCPREFIX = ../../vendor/cross/root/bin/x86_64-elf- AS = $(CCPREFIX)as CC = $(CCPREFIX)gcc diff --git a/vendor/cross/.gitignore b/vendor/cross/.gitignore index 14ae96c3..50fa83bc 100644 --- a/vendor/cross/.gitignore +++ b/vendor/cross/.gitignore @@ -1,6 +1,9 @@ /src/* !/src/.keep +/root/* +!/root/.keep + /build/i386/binutils/* !/build/i386/binutils/.keep /build/i386/gcc/* diff --git a/vendor/cross/build/i386/build.sh b/vendor/cross/build/i386/build.sh index fc7bd618..ee8696c5 100755 --- a/vendor/cross/build/i386/build.sh +++ b/vendor/cross/build/i386/build.sh @@ -6,16 +6,18 @@ REPO="$(realpath "$(dirname "$(realpath "$0")")/../..")" ARCH='i386' TARGET="$ARCH-elf" -PATH="$REPO/bin:$PATH" + +ROOT="$REPO/root" +PATH="$ROOT/bin:$PATH" if [ -z "$J" ]; then J='1'; fi cd "$REPO/build/$ARCH/binutils" -"$REPO/src/binutils-2.37/configure" --target="$TARGET" --prefix="$REPO" --with-sysroot --disable-nls --disable-werror +"$REPO/src/binutils-2.37/configure" --target="$TARGET" --prefix="$ROOT" --with-sysroot --disable-nls --disable-werror make -j"$J" make install cd "$REPO/build/$ARCH/gcc" -"$REPO/src/gcc-11.2.0/configure" --target="$TARGET" --prefix="$REPO" --disable-nls --enable-languages=c,c++ --without-headers +"$REPO/src/gcc-11.2.0/configure" --target="$TARGET" --prefix="$ROOT" --disable-nls --enable-languages=c,c++ --without-headers make -j"$J" all-gcc all-target-libgcc make install-gcc install-target-libgcc diff --git a/vendor/cross/build/riscv64/build.sh b/vendor/cross/build/riscv64/build.sh index 2bf7773e..30ece176 100755 --- a/vendor/cross/build/riscv64/build.sh +++ b/vendor/cross/build/riscv64/build.sh @@ -6,16 +6,18 @@ REPO="$(realpath "$(dirname "$(realpath "$0")")/../..")" ARCH='riscv64' TARGET="$ARCH-elf" -PATH="$REPO/bin:$PATH" + +ROOT="$REPO/root" +PATH="$ROOT/bin:$PATH" if [ -z "$J" ]; then J='1'; fi cd "$REPO/build/$ARCH/binutils" -"$REPO/src/binutils-2.37/configure" --target="$TARGET" --prefix="$REPO" --with-sysroot --disable-nls --disable-werror +"$REPO/src/binutils-2.37/configure" --target="$TARGET" --prefix="$ROOT" --with-sysroot --disable-nls --disable-werror make -j"$J" make install cd "$REPO/build/$ARCH/gcc" -"$REPO/src/gcc-11.2.0/configure" --target="$TARGET" --prefix="$REPO" --disable-nls --enable-languages=c,c++ --without-headers +"$REPO/src/gcc-11.2.0/configure" --target="$TARGET" --prefix="$ROOT" --disable-nls --enable-languages=c,c++ --without-headers make -j"$J" all-gcc all-target-libgcc make install-gcc install-target-libgcc diff --git a/vendor/cross/build/x86_64/build.sh b/vendor/cross/build/x86_64/build.sh index 4e81645f..b957442c 100755 --- a/vendor/cross/build/x86_64/build.sh +++ b/vendor/cross/build/x86_64/build.sh @@ -6,16 +6,18 @@ REPO="$(realpath "$(dirname "$(realpath "$0")")/../..")" ARCH='x86_64' TARGET="$ARCH-elf" -PATH="$REPO/bin:$PATH" + +ROOT="$REPO/root" +PATH="$ROOT/bin:$PATH" if [ -z "$J" ]; then J='1'; fi cd "$REPO/build/$ARCH/binutils" -"$REPO/binutils-2.37/configure" --target="$TARGET" --prefix="$REPO" --with-sysroot --disable-nls --disable-werror +"$REPO/binutils-2.37/configure" --target="$TARGET" --prefix="$ROOT" --with-sysroot --disable-nls --disable-werror make -j"$J" make install cd "$REPO/build/$ARCH/gcc" -"$REPO/gcc-11.2.0/configure" --target="$TARGET" --prefix="$REPO" --disable-nls --enable-languages=c,c++ --without-headers +"$REPO/gcc-11.2.0/configure" --target="$TARGET" --prefix="$ROOT" --disable-nls --enable-languages=c,c++ --without-headers make -j"$J" all-gcc all-target-libgcc make install-gcc install-target-libgcc diff --git a/vendor/cross/root/.keep b/vendor/cross/root/.keep new file mode 100644 index 00000000..e69de29b