From 292b2386d766826b15f5ca084d37aa2c485fdda6 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 17 Aug 2023 00:36:04 +0200 Subject: build: rework how sysroots work /usr/include is now built on the fly, letting me merge include files from multiple modules, which should be a win for organization later on. binutils & gcc need to be recompiled. limits.h shamelessly stolen from heat on #osdev, as gcc stopped providing me with its own header. which was a hack in the first place --- contrib/dep_builders/binutils | 5 +++-- contrib/dep_builders/gcc | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'contrib/dep_builders') diff --git a/contrib/dep_builders/binutils b/contrib/dep_builders/binutils index 42dd04b..7746525 100755 --- a/contrib/dep_builders/binutils +++ b/contrib/dep_builders/binutils @@ -10,9 +10,10 @@ fi export PREFIX="$(pwd)/toolchain/prefix/" export PATH="$(pwd)/toolchain/prefix/bin/:$PATH" BUILDDIR="$(pwd)/toolchain/binutils-build/" -SYSROOT="$(pwd)/sysroot/" +SYSROOT="$(pwd)/out/sysrootu/" mkdir -p $PREFIX mkdir -p $BUILDDIR +make out/sysrootu/usr/include/ cd $BUILDDIR @@ -23,5 +24,5 @@ cd $BUILDDIR --disable-nls \ --disable-werror mkdir -p gas/doc/ # stupid workaround for the broken build -make -j4 +make make install diff --git a/contrib/dep_builders/gcc b/contrib/dep_builders/gcc index 0a37541..defd4d5 100755 --- a/contrib/dep_builders/gcc +++ b/contrib/dep_builders/gcc @@ -10,9 +10,10 @@ fi export PREFIX="$(pwd)/toolchain/prefix/" export PATH="$(pwd)/toolchain/prefix/bin/:$PATH" BUILDDIR="$(pwd)/toolchain/gcc-build/" -SYSROOT="$(pwd)/sysroot/" +SYSROOT="$(pwd)/out/sysrootu/" mkdir -p $PREFIX mkdir -p $BUILDDIR +make out/sysrootu/usr/include/ cd $BUILDDIR @@ -25,7 +26,7 @@ cd $BUILDDIR --disable-nls \ --disable-gcov \ --disable-werror -make -j4 all-gcc -make -j4 all-target-libgcc +make all-gcc +make all-target-libgcc make install-gcc make install-target-libgcc -- cgit v1.2.3