Add Gentoo Portage host configuration

This commit is contained in:
wfalkowski committed 2026-10-15 21:54:34 +00:00
1 parent d40cb10f21
commit b19d64a282
57 files changed
+23234 -2

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
# /etc/portage/env/codex-lowmem.conf
# Alternative compiler configuration (Clang/LLVM) to mitigate low-memory compilation issues
# 1. Alternative compiler: Clang/LLVM toolchain
CC="clang"
CXX="clang++"
CPP="clang-cpp"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
# 2. Parallel jobs reduction: limit make to 1 job to prevent RAM exhaustion
MAKEOPTS="-j1"
# 3. Memory-efficient linker: use LLD and release unneeded memory pages
LDFLAGS="${LDFLAGS} -fuse-ld=lld -Wl,--no-keep-memory"
# 4. Memory-efficient LTO: use ThinLTO instead of full monolithic LTO
CFLAGS="${CFLAGS} -flto=thin"
CXXFLAGS="${CXXFLAGS} -flto=thin"