Maintainer: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Uploaders: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Build-Depends: debhelper (>= 10),
+ clang,
libboost-all-dev,
libbpf-dev [linux-any],
libcap-dev,
libsystemd-dev [linux-any],
libwslay-dev,
libxdp-dev [linux-any],
+ lld,
pkg-config,
python3-yaml,
ragel,
# for atomic support on powerpc (automatic on mipsel)
LDFLAGS += -latomic
+# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
+# build-id SHA1 prevents an issue with the debug symbols
+# and the --no-as-needed -ldl an issue with the dlsym not being found
+LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
+CC=clang
+CXX=clang++
# Only enable systemd integration on Linux operating systems
ifeq ($(DEB_HOST_ARCH_OS),linux)
Maintainer: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Uploaders: PowerDNS.COM BV <powerdns.support.sales@powerdns.com>
Build-Depends: debhelper (>= 10),
+ clang,
libboost-all-dev,
libcap-dev,
libcdb-dev,
libssl-dev,
libsystemd-dev [linux-any],
libwslay-dev,
+ lld,
pkg-config,
python3-yaml,
ragel,
# for atomic support on powerpc (automatic on mipsel)
LDFLAGS += -latomic
+# We need clang (LLVM) to link the Rust static library and the C++ code with LTO enabled
+# build-id SHA1 prevents an issue with the debug symbols
+# and the --no-as-needed -ldl an issue with the dlsym not being found
+LDFLAGS += -fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl
+CC=clang
+CXX=clang++
# Only enable systemd integration on Linux operating systems
ifeq ($(DEB_HOST_ARCH_OS),linux)
./configure --disable-dependency-tracking && \
make dist
RUN cp dnsdist-${BUILDER_VERSION}.tar.bz2 /sdist/
-
BuildRequires: readline-devel
BuildRequires: libedit-devel
BuildRequires: openssl-devel
-BuildRequires: python3-pyyaml
%if 0%{?suse_version}
BuildRequires: lua-devel
BuildRequires: boost169-devel
%else
BuildRequires: boost-devel
+BuildRequires: python3-pyyaml
+%endif
+
+%if 0%{?rhel} >= 8
+BuildRequires: clang
+BuildRequires: lld
%endif
%if 0%{?rhel} >= 7 || 0%{?amzn} == 2023
export CPPFLAGS=-I/usr/include/boost169
export LDFLAGS=-L/usr/lib64/boost169
%endif
+%if 0%{?rhel} >= 8
+# We need to build with LLVM/clang to be able to use LTO, since we are linking against a static Rust library built with LLVM
+export CC=clang
+export CXX=clang++
+# build-id SHA1 prevents an issue with the debug symbols
+# and the --no-as-needed -ldl an issue with the dlsym not being found
+export LDFLAGS="-fuse-ld=lld -Wl,--build-id=sha1 -Wl,--no-as-needed -ldl"
+%endif
export AR=gcc-ar
export RANLIB=gcc-ranlib
--enable-dns-over-quic \
--enable-dns-over-http3 \
--with-quiche \
+%endif
+%if 0%{?rhel} >= 8
--enable-yaml \
%endif
PKG_CONFIG_PATH=/usr/lib/pkgconfig:/opt/lib64/pkgconfig