fix: adjust agressive optimization options
Sorry for my incompetence in C/C++ Credits: matrix @fox:matrix.org
This commit is contained in:
parent
d9b3be5c72
commit
d956601ed1
3 changed files with 13 additions and 2 deletions
13
.build.sh
13
.build.sh
|
@ -20,8 +20,17 @@ clone () {
|
|||
# optimizations
|
||||
set_cflags () {
|
||||
export \
|
||||
CFLAGS="-Ofast" CPPFLAGS="-Ofast" LDFLAGS="-Wl,-O3 -Wl,-S" \
|
||||
RUSTFLAGS="-C target-cpu=native"
|
||||
CFLAGS="-std=gnu2x -Ofast -march=native" \
|
||||
CPPFLAGS="-Ofast -march=native" \
|
||||
LDFLAGS="-Wl,-O3" \
|
||||
RUSTFLAGS="-C target-cpu=native -C panic=abort"
|
||||
}
|
||||
|
||||
# in a separate fn because ring does not build with LTO
|
||||
use_lto () {
|
||||
export \
|
||||
CFLAGS="$CFLAGS -flto=auto -fwhole-program" \
|
||||
CPPFLAGS="$CPPFLAGS -flto=auto -fwhole-program"
|
||||
}
|
||||
|
||||
# make -j12
|
||||
|
|
|
@ -16,6 +16,7 @@ clone https://gitlab.isc.org/isc-projects/bind9.git bind9
|
|||
cd bind9
|
||||
trap 'cd ..' EXIT
|
||||
set_cflags
|
||||
use_lto
|
||||
|
||||
echo
|
||||
echo '==> autoreconf -fi'
|
||||
|
|
|
@ -17,6 +17,7 @@ clone https://github.com/NLnetLabs/ldns.git ldns
|
|||
cd ldns
|
||||
trap 'cd ..' EXIT
|
||||
set_cflags
|
||||
use_lto
|
||||
|
||||
echo
|
||||
echo '==> libtoolize -ci'
|
||||
|
|
Loading…
Add table
Reference in a new issue