]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Ignore `re2`'s broken compilation flags 15126/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Feb 2025 16:47:39 +0000 (17:47 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 6 Feb 2025 16:47:39 +0000 (17:47 +0100)
Apparently some version(s) of `re2` pass `-std=c++11` in the result
of `pkg-config --cflags`, which helpfully downgrades us from C++17
to C++11. Let's just ignore what it says.

pdns/dnsdistdist/meson/re2/meson.build

index f85c297fb5713a0c375e5a6c7a86e8ab135a5e6a..8ef952dce239aa827d8b52516991436039102476 100644 (file)
@@ -1,5 +1,12 @@
 opt_libre2 = get_option('re2')
 dep_libre2 = dependency('re2', required: opt_libre2)
 
+if dep_libre2.found()
+    # we need to NOT pick the CFLAGS because re2 "helpfully" puts -std=c++11 here
+    dep_libre2 = dep_libre2.partial_dependency(
+        link_args: true
+    )
+endif
+
 conf.set('HAVE_RE2', dep_libre2.found(), description: 're2')
 summary('Re2', dep_libre2.found(), bool_yn: true, section: 're2')