| 양쪽 이전 판 이전 판 다음 판 | 이전 판 |
| linuxfromscratch:13.0:start [2026/03/26 08:08] – baecy | linuxfromscratch:13.0:start [2026/03/31 15:31] (현재) – [Optimize Failed Package] baecy |
|---|
| # Graphite (LTO -fgraphite-identity -floop-nest-optimize -floop-interchange) | # Graphite (LTO -fgraphite-identity -floop-nest-optimize -floop-interchange) |
| COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects -fgraphite-identity -floop-nest-optimize -floop-interchange" | COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects -fgraphite-identity -floop-nest-optimize -floop-interchange" |
| export CFLAGS="${COMMON_FLAGS}" | |
| export CXXFLAGS="${COMMON_FLAGS}" | |
| export FCFLAGS="${COMMON_FLAGS}" | |
| export FFLAGS="${COMMON_FLAGS}" | |
| export RUSTFLAGS="-C target-cpu=native -C opt-level=3" | |
| |
| export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" | export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" |
| | source /etc/flags-store/export.list |
| | alias clear-flags='unset CFLAGS CXXFLAGS FCFLAGS FFLAGS RUSTFLAGS LDFLAGS' |
| </codeprism> | </codeprism> |
| /etc/flags-store/toggle-flags.sh | /etc/flags-store/toggle-flags.sh |
| | <codeprism lang=bash> |
| #!/usr/bin/env bash | #!/usr/bin/env bash |
| |
| |
| export MAKEFLAGS="-j$(nproc)" | export MAKEFLAGS="-j$(nproc)" |
| alias clear-flags='unset CFLAGS CXXFLAGS FCFLAGS FFLAGS RUSTFLAGS LDFLAGS MAKEFLAGS' | |
| </codeprism> | </codeprism> |
| /etc/flags-store/01-safe.flag | /etc/flags-store/export.list |
| <codeprism lang=bash> | <codeprism lang=bash> |
| #Basic (-native -O3 - pipe) | |
| COMMON_FLAGS="-march=native -O3 -pipe" | |
| export CFLAGS="${COMMON_FLAGS}" | export CFLAGS="${COMMON_FLAGS}" |
| export CXXFLAGS="${COMMON_FLAGS}" | export CXXFLAGS="${COMMON_FLAGS}" |
| export FFLAGS="${COMMON_FLAGS}" | export FFLAGS="${COMMON_FLAGS}" |
| export RUSTFLAGS="-C target-cpu=native -C opt-level=3" | export RUSTFLAGS="-C target-cpu=native -C opt-level=3" |
| | </codeprism> |
| | /etc/flags-store/01-safe.flag |
| | <codeprism lang=bash> |
| | #Basic (-native -O3 - pipe) |
| | COMMON_FLAGS="-march=native -O3 -pipe" |
| export LDFLAGS="-Wl,-O1 -Wl,--as-needed" | export LDFLAGS="-Wl,-O1 -Wl,--as-needed" |
| | source /etc/flags-store/export.list |
| </codeprism> | </codeprism> |
| /etc/flag-store/02-lto.flags | /etc/flag-store/02-lto.flags |
| #LTO (Basic + -flto=auto -ffat-lto-objects) | #LTO (Basic + -flto=auto -ffat-lto-objects) |
| COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects" | COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects" |
| export CFLAGS="${COMMON_FLAGS}" | |
| export CXXFLAGS="${COMMON_FLAGS}" | |
| export FCFLAGS="${COMMON_FLAGS}" | |
| export FFLAGS="${COMMON_FLAGS}" | |
| export RUSTFLAGS="-C target-cpu=native -C opt-level=3" | |
| |
| export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" | export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" |
| | source /etc/flags-store/export.list |
| alias clear-flags='unset CFLAGS CXXFLAGS FCFLAGS FFLAGS RUSTFLAGS LDFLAGS' | |
| </codeprism> | </codeprism> |
| /etc/flags-store/03-graphite.flags | /etc/flags-store/03-graphite.flags |
| #Kernel (-native -O2 - pipe) | #Kernel (-native -O2 - pipe) |
| COMMON_FLAGS="-march=native -O2 -pipe" | COMMON_FLAGS="-march=native -O2 -pipe" |
| export CFLAGS="${COMMON_FLAGS}" | source /etc/flags-store/export.list |
| export CXXFLAGS="${COMMON_FLAGS}" | |
| export FCFLAGS="${COMMON_FLAGS}" | |
| export FFLAGS="${COMMON_FLAGS}" | |
| #export RUSTFLAGS="-C target-cpu=native -C opt-level=3" | |
| #export LDFLAGS="-Wl,-O1 -Wl,--as-needed" | |
| </codeprism> | </codeprism> |
| /etc/flags-store/99-debug.flags | /etc/flags-store/99-debug.flags |
| # DEBUG (Graphite -fopt-info) | # DEBUG (Graphite -fopt-info) |
| COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects -fgraphite-identity -floop-nest-optimize -floop-interchange -fopt-info" | COMMON_FLAGS="-march=native -O3 -pipe -flto=auto -ffat-lto-objects -fgraphite-identity -floop-nest-optimize -floop-interchange -fopt-info" |
| export CFLAGS="${COMMON_FLAGS}" | |
| export CXXFLAGS="${COMMON_FLAGS}" | |
| export FCFLAGS="${COMMON_FLAGS}" | |
| export FFLAGS="${COMMON_FLAGS}" | |
| export RUSTFLAGS="-C target-cpu=native -C opt-level=3" | |
| |
| export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" | export LDFLAGS="-flto=auto -Wl,-O1 -Wl,--as-needed" |
| | source /etc/flags-store/export.list |
| alias clear-flags='unset CFLAGS CXXFLAGS FCFLAGS FFLAGS RUSTFLAGS LDFLAGS' | |
| </codeprism> | </codeprism> |
| |
| === Optimize Failed Package === | ==== Optimize Failed Package ==== |
| * Glibc: LTO-x (safe: -march=native -O3 -pipe) | * Glibc: LTO-x (safe: -march=native -O3 -pipe) |
| * TCL: LTO-x (safe: -march=native -O3 -pipe) | * TCL: LTO-x (safe: -march=native -O3 -pipe) |
| * OpenSSL: LTO-x (safe: -march=native -O3 -pipe) | * OpenSSL: LTO-x (safe: -march=native -O3 -pipe) |
| * Linux-6.18.10: LTO-x, O3-x (safe: -march=native -O2 -pipe) | * Linux-6.18.10: LTO-x, O3-x (safe: -march=native -O2 -pipe) |
| | * frei0r-2.5.1: LTO-x -march=native-x (safe: -O3 -pipe) |
| | * Node.js-22.22.0: LTO-x (safe: -march=native -O3 -pipe) (--shared-sqlite: x) |
| | * SpiderMonkey from firefox-140.8.0: LTO-x (safe: -march=native -O2 -pipe) |
| | * libaio-0.3.113: LTO=x (safe: -march=native -O3 -pipe) |
| | * FFmpeg-8.0.1: LTO=x (safe: -march=native -O3 -pipe) |
| | * ristretto-0.13.4: Graphite-X (safe: -march=native -O3 -pipe -flto=auto -ffat-lto-objects) |
| |
| === Chapter 8.30. GCC-15.2.0 === | ==== 책과 다른 방식의 컴파일이 필요한 패키지 ==== |
| | |
| | ==== Chapter 8.30. GCC-15.2.0 ==== |
| <codeprism lang=bash cmdout=2-12> | <codeprism lang=bash cmdout=2-12> |
| gcc -v | gcc -v |