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 # 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 # because -z adds a null byte, which messes with the files generated by
# LLVM's build process. ~ahill # 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") NATIVE_TOOL_DIR=$(dirname $(which llvm-tblgen) | sed -z "s/\n//g")
cd llvm-project-*/ cd llvm-project-*/
cmake -S llvm -B build-llvm \ cmake -S llvm -B build-llvm \
@ -200,6 +204,8 @@ cmake -S llvm -B build-llvm \
-DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \ -DLLVM_ENABLE_PROJECTS="clang;lld;llvm" \
-DLLVM_ENABLE_ZSTD=OFF \ -DLLVM_ENABLE_ZSTD=OFF \
-DLLVM_HOST_TRIPLE=$TARGET \ -DLLVM_HOST_TRIPLE=$TARGET \
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON \
-DLLVM_INSTALL_CCTOOLS_SYMLINKS=ON \
-DLLVM_NATIVE_TOOL_DIR=$NATIVE_TOOL_DIR \ -DLLVM_NATIVE_TOOL_DIR=$NATIVE_TOOL_DIR \
-DLLVM_TABLEGEN=$NATIVE_TOOL_DIR/llvm-tblgen -DLLVM_TABLEGEN=$NATIVE_TOOL_DIR/llvm-tblgen
cmake --build build-llvm cmake --build build-llvm
@ -227,5 +233,26 @@ make -O -j $PROCS
make -O -j $PROCS install CONFIG_PREFIX=$BOOTSTRAP/root make -O -j $PROCS install CONFIG_PREFIX=$BOOTSTRAP/root
cd .. 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 # Install Treetap
cp $BOOTSTRAP/../treetap $BOOTSTRAP/root/bin/ cp $BOOTSTRAP/../treetap $BOOTSTRAP/root/bin/

View File

@ -0,0 +1,37 @@
# Maintainer: Alexander Hill <ahill@breadpudding.dev>
SRC_HASH="6d5c2f58583588ea791f4c8645004071d00dfa554a5bf788a006ca1eb5abd70b"
SRC_NAME="libressl"
SRC_URL="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-4.2.1.tar.gz"
SRC_VERSION="4.2.1"
build() {
tar xf ../$SRC_FILENAME
cd libressl-*/
# TODO: What even is sharedstatedir and what should Maple Linux do with it?
# ~ahill
./configure \
--bindir=$TT_BINDIR \
--build=$TT_BUILD \
--datarootdir=/usr/share \
--disable-static \
--host=$TT_TARGET \
--includedir=$TT_INCLUDEDIR \
--libdir=$TT_LIBDIR \
--libexecdir=$TT_LIBDIR \
--localstatedir=/var \
--prefix=$TT_PREFIX \
--runstatedir=/run \
--sbindir=$TT_BINDIR \
--sysconfdir=$TT_CONFDIR \
--with-sysroot=$TT_SYSROOT
make -j $TT_PROCS
}
clean() {
rm -rf libressl-*/
}
package() {
cd libressl-*/
make -j $TT_PROCS install DESTDIR=$TT_SYSROOT
}