Skip to content

Instantly share code, notes, and snippets.

@dillagr
Last active June 9, 2024 08:00
Show Gist options
  • Save dillagr/384a7c0e7ae9af5429d68eb84969e2b2 to your computer and use it in GitHub Desktop.
Save dillagr/384a7c0e7ae9af5429d68eb84969e2b2 to your computer and use it in GitHub Desktop.
this is what i used to compile unbound for qnap (with libhiredis) for redis enabled cachedb backend
## checkout unbound from:
## https://github.com/NLnetLabs/unbound
./configure \
--target=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--build=x86_64-pc-linux-gnu \
--program-prefix= \
--program-suffix= \
--prefix=/opt \
--bindir=/opt/bin \
--sbindir=/opt/sbin \
--libexecdir=/opt/lib \
--disable-flto \
--sysconfdir=/opt/etc \
--datadir=/opt/var/lib/unbound \
--localstatedir=/opt/var \
--with-chroot-dir \
--enable-allsymbols \
--enable-ipset \
--enable-ecdsa \
--enable-tfo-client \
--enable-tfo-server \
--with-libexpat=/opt \
--with-run-dir=/opt/var/lib/unbound \
--with-conf-file=/opt/etc/unbound/unbound.conf \
--with-pidfile=/opt/var/run/unbound.pid \
--enable-cachedb \
--with-ssl=/opt/local/openssl \
--with-libmnl=/opt \
--with-libhiredis=/opt/local \
--with-pthreads \
--enable-event-api \
--disable-gost \
--with-libevent
##
## prerequisite(s):
## install: entware (+build packages)
## install: redis-server
## compile: openssl
## compile: libevent
##
@vincejv
Copy link

vincejv commented Jun 9, 2024

why would you disable flto or link time optimization? it would produce much slower binaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment