From: Otto Moerbeek Date: Mon, 27 Oct 2025 10:05:54 +0000 (+0100) Subject: Revert the actual move to C++, but keep all the other changes X-Git-Tag: rec-5.4.0-alpha1~100^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13a2f2b0512cfb2b0484da6a1becbbc91625f52f;p=thirdparty%2Fpdns.git Revert the actual move to C++, but keep all the other changes Signed-off-by: Otto Moerbeek --- diff --git a/builder-support/specs/dnsdist.spec b/builder-support/specs/dnsdist.spec index 2561c39797..9439dd38fd 100644 --- a/builder-support/specs/dnsdist.spec +++ b/builder-support/specs/dnsdist.spec @@ -19,7 +19,8 @@ BuildRequires: systemd-units BuildRequires: systemd-devel %endif -%if 0%{?rhel} == 8 +# Only when we move to C++20 +%if 0%{?rhel} == 8 && 0 BuildRequires: boost1.78-devel %else BuildRequires: boost-devel @@ -74,7 +75,8 @@ dnsdist is a high-performance DNS loadbalancer that is scriptable in Lua. %build # 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 -%if 0%{?rhel} == 8 +# Only when we move to C++20 +%if 0%{?rhel} == 8 && 0 export BOOST_INCLUDEDIR=/usr/include/boost1.78 export BOOST_LIBRARYDIR=/usr/lib64/boost1.78 %endif diff --git a/builder-support/specs/pdns.spec b/builder-support/specs/pdns.spec index 2bb54d85f8..38975383c7 100644 --- a/builder-support/specs/pdns.spec +++ b/builder-support/specs/pdns.spec @@ -20,7 +20,8 @@ BuildRequires: systemd-devel BuildRequires: krb5-devel BuildRequires: p11-kit-devel BuildRequires: libcurl-devel -%if 0%{?rhel} == 8 +# Only when we move to C++20 +%if 0%{?rhel} == 8 && 0 BuildRequires: boost1.78-devel %else BuildRequires: boost-devel @@ -176,7 +177,8 @@ This package contains the ixfrdist program. %autosetup -p1 -n %{name}-%{getenv:BUILDER_VERSION} %build -%if 0%{?rhel} == 8 +# Only when we move to C++20 +%if 0%{?rhel} == 8 && 0 export BOOST_INCLUDEDIR=/usr/include/boost1.78 export BOOST_LIBRARYDIR=/usr/lib64/boost1.78 export CPPFLAGS=-I$BOOST_INCLUDEDIR diff --git a/configure.ac b/configure.ac index 3e4177cea5..c2f969a795 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ PDNS_CHECK_FLEX # Warn when pkg.m4 is missing m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config]) -AX_CXX_COMPILE_STDCXX_20([ext], [mandatory]) +AX_CXX_COMPILE_STDCXX_17([noext], [mandatory]) LT_PREREQ([2.2.2]) LT_INIT([disable-static dlopen]) diff --git a/meson.build b/meson.build index 5736de86d3..695e50eb73 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project( default_options: [ 'buildtype=debugoptimized', 'warning_level=2', # TODO Move this to 3 to enable -Wpedantic - 'cpp_std=gnu++20', + 'cpp_std=c++17', ], ) diff --git a/pdns/distributor.hh b/pdns/distributor.hh index fb18019b7d..cdee87b67d 100644 --- a/pdns/distributor.hh +++ b/pdns/distributor.hh @@ -173,7 +173,7 @@ templateMultiThreadDistributor