]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Revert the actual move to C++, but keep all the other changes
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 27 Oct 2025 10:05:54 +0000 (11:05 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Wed, 12 Nov 2025 08:09:27 +0000 (09:09 +0100)
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
builder-support/specs/dnsdist.spec
builder-support/specs/pdns.spec
configure.ac
meson.build
pdns/distributor.hh
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/dnsdist-rust-lib/rust/build.rs
pdns/dnsdistdist/meson.build
pdns/recursordist/configure.ac
pdns/recursordist/meson.build
pdns/recursordist/rec-rust-lib/rust/build.rs

index 2561c39797071096d3d81e361c26b232d7ad7b7c..9439dd38fd207b5059a011524f32710541d0b5b8 100644 (file)
@@ -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
index 2bb54d85f8f37d40a0db94ddea6b86fd5c73614f..38975383c783736f5afac590f218d0f6b61145d7 100644 (file)
@@ -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
index 3e4177cea5e872d6bf4acc7716f62b254e6e8104..c2f969a7950f9f665a7e0c99baa02f5328d2d757 100644 (file)
@@ -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])
 
index 5736de86d38740683bae5dce9fbca515b068ed6e..695e50eb731eca02fbc0f71ba210f2f64a51892d 100644 (file)
@@ -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',
   ],
 )
 
index fb18019b7d95521cf8b7130fdb7fc3dd8d405a6e..cdee87b67dc7b33a36cc3dd1a9c940b1e78535d8 100644 (file)
@@ -173,7 +173,7 @@ template<class Answer, class Question, class Backend>MultiThreadDistributor<Answ
   g_log<<Logger::Warning<<"About to create "<<numberOfThreads<<" backend threads for UDP"<<endl;
 
   for (int distributorIdx = 0; distributorIdx < numberOfThreads; distributorIdx++) {
-    std::thread t([=,this](){distribute(distributorIdx);});
+    std::thread t([=](){distribute(distributorIdx);});
     t.detach();
     Utility::usleep(50000); // we've overloaded mysql in the past :-)
   }
index 00fea50383b09415a490a5a7f195ed60782f2606..2297d1a78b27186ca5680083dd62d1ff80adbf67 100644 (file)
@@ -148,7 +148,7 @@ PDNS_CHECK_LMDB
 PDNS_ENABLE_IPCIPHER
 PDNS_CHECK_AARCH64_UINT64X2_T
 
-AX_CXX_COMPILE_STDCXX_20([ext], [mandatory])
+AX_CXX_COMPILE_STDCXX_17([noext], [mandatory])
 
 AC_MSG_CHECKING([whether we will enable compiler security checks])
 AC_ARG_ENABLE([hardening],
index a3a0bb3e4f2115a7bb6012527956d5da323d0a64..26bdbc13c10326f5743441ebbbe49445dc384bfd 100644 (file)
@@ -5,7 +5,7 @@ use std::env;
 fn main() {
     let mut bridge = cxx_build::bridge("src/lib.rs");
     let mut build = bridge
-            .flag_if_supported("-std=c++17")
+            .std("c++17")
             .flag("-Isrc")
             .flag("-I.")
             .flag("-I..")
@@ -23,4 +23,4 @@ fn main() {
 
     println!("cargo:rerun-if-changed=src/lib.rs");
     println!("cargo:rerun-if-changed=src/helpers.rs");
-}
\ No newline at end of file
+}
index 84c59f5926de8085cf412265560e44f7f2771fce..69e42d5b3bf8d3c706b5af98b2bcc2d1087064e7 100644 (file)
@@ -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',
     'b_pie=true',
   ],
 )
index 27bdcf196588654e6722351e19a873b7b67c5a30..4e79b216461ba8b572ef63d37dafa750e924dacc 100644 (file)
@@ -32,7 +32,7 @@ CPPFLAGS="-DRECURSOR $CPPFLAGS"
 # 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])
 PDNS_CHECK_CARGO([1.64])
 
 # Rust runtime used dlopen from its static lib
index 0f64b83c823bb230a0bc896ada2afe5e14282288..84d75a38c8e770dc6cd2d7c9d9bb901bfc6b5285 100644 (file)
@@ -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',
   ],
 )
 
index 37b6efe258d8a98ca9e93b44acf1a2f15b5560d3..2f2e1b541d807ebc0d9ef34cf21a000c5e113ce9 100644 (file)
@@ -2,7 +2,7 @@ fn main() {
     let sources = vec!["src/lib.rs", "src/web.rs", "src/misc.rs"];
     cxx_build::bridges(sources)
         // .file("src/source.cc") Code callable from Rust is in ../cxxsupport.cc
-        .flag_if_supported("-std=c++17")
+        .std("c++17")
         .flag("-Isrc")
         .flag("-I../..")
         .compile("recrust");