Bootstrapped GNU Make and added LibreSSL

This commit is contained in:
Alexander Hill
2025-11-16 20:08:27 -05:00
parent 9772d7f49d
commit a4c9aa19c7
2 changed files with 64 additions and 0 deletions

View File

@@ -184,6 +184,10 @@ export CXXFLAGS="$CXXFLAGS -isystem $BOOTSTRAP/root/usr/include/c++/v1 -nostdinc
# NOTE: We're using sed to remove newlines instead of dirname's own -z switch
# because -z adds a null byte, which messes with the files generated by
# LLVM's build process. ~ahill
# NOTE: Many build scripts still rely on the old Unix names for tools such as
# cc and ld to function. Because of this, we enable
# LLVM_INSTALL_BINUTILS_SYMLINKS and LLVM_INSTALL_CCTOOLS_SYMLINKS for
# compatibility's sake. ~ahill
NATIVE_TOOL_DIR=$(dirname $(which llvm-tblgen) | sed -z "s/\n//g")
cd llvm-project-*/
cmake -S llvm -B build-llvm \
@@ -200,6 +204,8 @@ cmake -S llvm -B build-llvm \
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
-DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_HOST_TRIPLE=$TARGET \
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
-DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_TOOL_DIR \
-DLLVM_TABLEGEN=$NATIVE_TOOL_DIR/llvm-tblgen
cmake --build build-llvm
@@ -227,5 +233,26 @@ make -O -j $PROCS
make -O -j $PROCS install CONFIG_PREFIX=$BOOTSTRAP/root
cd ..
# Build Make
MAKE_VERSION=$(sed -En "s/SRC_VERSION=\"?(.+)\"/\1/p" $SPEC/make/make.spec)
tar xf $SOURCES/make/$MAKE_VERSION/make-*.tar*
cd make-*/
./configure \
--bindir=/bin \
--datarootdir=/usr/share \
--enable-year2038 \
--host=$TARGET \
--includedir=/usr/include \
--libdir=/lib \
--libexecdir=/lib \
--localstatedir=/var \
--prefix=/ \
--runstatedir=/run \
--sbindir=/bin \
--sysconfdir=/etc
make -O -j $PROCS
make -O -j $PROCS install DESTDIR=$BOOTSTRAP/root
cd ..
# Install Treetap
cp $BOOTSTRAP/../treetap $BOOTSTRAP/root/bin/