dslm4515 / Optimux

Optimized Musl Linux From Scratch
15 stars 3 forks source link

Optimux

Optimized Musl Linux

This is a deriviative of MLFS (Musl Linux From Scratch) with a focus on optimization and speed.

Methods and patches will be from Alpine Linux, Void Linux, and Clear Linux. Work from Alpine and Void are primarily for Musl Libc support and optimizations from Clear Linux.

Specification

Method

Build cross-tools & tools just like in MLFS, but enable LTO & graphite (ISL) in tools' GCC & binutils.

Most packages [in chroot] will be built with these flags:

CFLAGS="-flto -march=native -mtune=native -O3 -pipe -fno-semantic-interposition "
CFLAGS+="-falign-functions=32 -flimit-function-alignment -malign-data=cacheline "
CXXFLAGS=$CFLAGS
LDFLAGS="-flto -Wl,-O2 -Wl,--as-needed

To see what to set for march and mtune, run the following on the target machine:

gcc -march=native -Q --help=target | grep march | sed '2d' && \
gcc -march=native -Q --help=target | grep mtune | sed '1d' | sed '2d'

Goals

Build Requirements

Issues

Built system will not allow any logins. This was caused by a broken Shadow-4.9 build. Using shadow-4.8 build from MLFS for now.