Big script
This commit is contained in:
30
toolchain/scripts/100-chroot-env.sh
Normal file
30
toolchain/scripts/100-chroot-env.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
# ============================================================================
|
||||
# DarkForge Linux — Phase 3: Chroot Environment for Chapter 8 Builds
|
||||
# ============================================================================
|
||||
# Purpose: Sourced by all Phase 3 build scripts. Sets hardware-specific
|
||||
# compiler flags for native compilation targeting AMD Zen 5.
|
||||
# ============================================================================
|
||||
|
||||
# Hardware-specific flags — AMD Ryzen 9 9950X3D (Zen 5)
|
||||
export CFLAGS="-march=znver5 -O2 -pipe -fomit-frame-pointer"
|
||||
export CXXFLAGS="${CFLAGS}"
|
||||
export LDFLAGS="-Wl,-O1,--as-needed"
|
||||
export MAKEFLAGS="-j32"
|
||||
|
||||
# Standard paths
|
||||
export SRCDIR="/sources"
|
||||
export SCRIPTS="/sources/toolchain-scripts"
|
||||
|
||||
# Helper function for consistent build pattern
|
||||
pkg_extract() {
|
||||
local tarball="$1"
|
||||
cd "${SRCDIR}"
|
||||
tar -xf "${tarball}"
|
||||
}
|
||||
|
||||
pkg_cleanup() {
|
||||
local dir="$1"
|
||||
cd "${SRCDIR}"
|
||||
rm -rf "${dir}"
|
||||
}
|
||||
Reference in New Issue
Block a user