Initial commit: DarkForge Linux — Phases 0-12
Complete from-scratch Linux distribution targeting AMD Ryzen 9 9950X3D + NVIDIA RTX 5090 on ASUS ROG CROSSHAIR X870E HERO. Deliverables: - dpack: custom package manager in Rust (3,800 lines) - TOML package parser, dependency resolver, build sandbox - CRUX Pkgfile and Gentoo ebuild converters - Shared library conflict detection - 124 package definitions across 4 repos (core/extra/desktop/gaming) - 34 toolchain bootstrap scripts (LFS 13.0 adapted for Zen 5) - Linux 6.19.8 kernel config (hardware-specific, fully commented) - SysVinit init system with rc.d service scripts - Live ISO builder (UEFI-only, squashfs+xorriso) - Interactive installer (GPT partitioning, EFISTUB boot) - Integration test checklist (docs/TESTING.md) No systemd. No bootloader. No display manager. Kernel boots via EFISTUB → auto-login → dwl Wayland compositor. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
56
toolchain/scripts/005-libstdcxx.sh
Executable file
56
toolchain/scripts/005-libstdcxx.sh
Executable file
@@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 0, Chapter 5: Libstdc++ (from GCC)
|
||||
# ============================================================================
|
||||
# Purpose: Build the C++ standard library (libstdc++) for the target.
|
||||
# This was deferred from GCC Pass 1 because it depends on glibc,
|
||||
# which wasn't available then. Now that glibc is installed in the
|
||||
# target sysroot, we can build libstdc++.
|
||||
# Inputs: ${LFS}/sources/gcc-15.2.0.tar.xz (same source as GCC Pass 1)
|
||||
# Outputs: libstdc++ in ${LFS}/usr/lib/
|
||||
# Assumes: GCC Pass 1 + Glibc complete
|
||||
# Ref: LFS 13.0 §5.6
|
||||
# ============================================================================
|
||||
|
||||
set -euo pipefail
|
||||
source "${LFS}/sources/darkforge-env.sh"
|
||||
|
||||
PACKAGE="gcc"
|
||||
VERSION="15.2.0"
|
||||
SRCDIR="${LFS}/sources"
|
||||
|
||||
echo "=== Building libstdc++ from ${PACKAGE}-${VERSION} ==="
|
||||
|
||||
cd "${SRCDIR}"
|
||||
tar -xf "${PACKAGE}-${VERSION}.tar.xz"
|
||||
cd "${PACKAGE}-${VERSION}"
|
||||
|
||||
mkdir -v build
|
||||
cd build
|
||||
|
||||
# Configure only the libstdc++ component
|
||||
# --host=$LFS_TGT: cross-compile for our target
|
||||
# --disable-multilib: no 32-bit support at this stage
|
||||
# --disable-nls: no internationalization
|
||||
# --disable-libstdcxx-pch: skip precompiled headers (saves time/space)
|
||||
# --with-gxx-include-dir: point to the cross-compiler's include path
|
||||
../libstdc++-v3/configure \
|
||||
--host="${LFS_TGT}" \
|
||||
--build="$(../config.guess)" \
|
||||
--prefix=/usr \
|
||||
--disable-multilib \
|
||||
--disable-nls \
|
||||
--disable-libstdcxx-pch \
|
||||
--with-gxx-include-dir="/tools/${LFS_TGT}/include/c++/${VERSION}"
|
||||
|
||||
make
|
||||
make DESTDIR="${LFS}" install
|
||||
|
||||
# Remove libtool archive files — they cause problems with cross-compilation
|
||||
rm -v "${LFS}/usr/lib/lib"{stdc++{,exp,fs},supc++}.la 2>/dev/null || true
|
||||
|
||||
# Cleanup
|
||||
cd "${SRCDIR}"
|
||||
rm -rf "${PACKAGE}-${VERSION}"
|
||||
|
||||
echo "=== libstdc++ from ${PACKAGE}-${VERSION} complete ==="
|
||||
Reference in New Issue
Block a user