]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Remove duplicated meson directories and files
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 14 Oct 2024 09:29:27 +0000 (11:29 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 28 Jan 2025 13:37:21 +0000 (14:37 +0100)
85 files changed:
pdns/dnsdistdist/meson/atomics [new symlink]
pdns/dnsdistdist/meson/atomics/atomic_add_fetch.cc [deleted file]
pdns/dnsdistdist/meson/atomics/meson.build [deleted file]
pdns/dnsdistdist/meson/auto-var-init [new symlink]
pdns/dnsdistdist/meson/auto-var-init/meson.build [deleted file]
pdns/dnsdistdist/meson/boost [new symlink]
pdns/dnsdistdist/meson/boost/meson.build [deleted file]
pdns/dnsdistdist/meson/clock-gettime [new symlink]
pdns/dnsdistdist/meson/clock-gettime/meson.build [deleted file]
pdns/dnsdistdist/meson/code-coverage [new symlink]
pdns/dnsdistdist/meson/code-coverage/meson.build [deleted file]
pdns/dnsdistdist/meson/config [new symlink]
pdns/dnsdistdist/meson/config/meson.build [deleted file]
pdns/dnsdistdist/meson/dlopen [new symlink]
pdns/dnsdistdist/meson/dlopen/meson.build [deleted file]
pdns/dnsdistdist/meson/dnstap [new symlink]
pdns/dnsdistdist/meson/dnstap/meson.build [deleted file]
pdns/dnsdistdist/meson/dot [new symlink]
pdns/dnsdistdist/meson/dot/meson.build [deleted file]
pdns/dnsdistdist/meson/gnutls [new symlink]
pdns/dnsdistdist/meson/gnutls/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening [new symlink]
pdns/dnsdistdist/meson/hardening/control-flow/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/fortify-source/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/relro/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/stack-clash-prot/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/stack-prot/meson.build [deleted file]
pdns/dnsdistdist/meson/hardening/stack-smashing-prot/meson.build [deleted file]
pdns/dnsdistdist/meson/ipcipher [new symlink]
pdns/dnsdistdist/meson/ipcipher/meson.build [deleted file]
pdns/dnsdistdist/meson/kiss-rng [new symlink]
pdns/dnsdistdist/meson/kiss-rng/meson.build [deleted file]
pdns/dnsdistdist/meson/libdir [new symlink]
pdns/dnsdistdist/meson/libdir/meson.build [deleted file]
pdns/dnsdistdist/meson/libssl [new symlink]
pdns/dnsdistdist/meson/libssl/meson.build [deleted file]
pdns/dnsdistdist/meson/libsystemd [new symlink]
pdns/dnsdistdist/meson/libsystemd/meson.build [deleted file]
pdns/dnsdistdist/meson/mmap [new symlink]
pdns/dnsdistdist/meson/mmap/meson.build [deleted file]
pdns/dnsdistdist/meson/net-libs [new symlink]
pdns/dnsdistdist/meson/net-libs/meson.build [deleted file]
pdns/dnsdistdist/meson/platform [new symlink]
pdns/dnsdistdist/meson/platform/meson.build [deleted file]
pdns/dnsdistdist/meson/pthread-headers [new symlink]
pdns/dnsdistdist/meson/pthread-headers/meson.build [deleted file]
pdns/dnsdistdist/meson/pthread-np [new symlink]
pdns/dnsdistdist/meson/pthread-np/meson.build [deleted file]
pdns/dnsdistdist/meson/pthread-setname [new symlink]
pdns/dnsdistdist/meson/pthread-setname/meson.build [deleted file]
pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_2args.cc [deleted file]
pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_void_2args.cc [deleted file]
pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_1arg.cc [deleted file]
pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_2args.cc [deleted file]
pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_3args.cc [deleted file]
pdns/dnsdistdist/meson/reproducible [new symlink]
pdns/dnsdistdist/meson/reproducible/meson.build [deleted file]
pdns/dnsdistdist/meson/sanitizers [new symlink]
pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/meson.build [deleted file]
pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_1ptr.cc [deleted file]
pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_3ptrs.cc [deleted file]
pdns/dnsdistdist/meson/sanitizers/meson.build [deleted file]
pdns/dnsdistdist/meson/strerror [new symlink]
pdns/dnsdistdist/meson/strerror/meson.build [deleted file]
pdns/dnsdistdist/meson/strerror/strerror_r.c [deleted file]
pdns/dnsdistdist/meson/summary [new symlink]
pdns/dnsdistdist/meson/summary/meson.build [deleted file]
pdns/dnsdistdist/meson/sysconfdir [new symlink]
pdns/dnsdistdist/meson/sysconfdir/meson.build [deleted file]
pdns/dnsdistdist/meson/systemd [new symlink]
pdns/dnsdistdist/meson/systemd/meson.build [deleted file]
pdns/dnsdistdist/meson/timet-sign [new symlink]
pdns/dnsdistdist/meson/timet-sign/meson.build [deleted file]
pdns/dnsdistdist/meson/timet-sign/timet_sign.cc [deleted file]
pdns/dnsdistdist/meson/timet-size [new symlink]
pdns/dnsdistdist/meson/timet-size/meson.build [deleted file]
pdns/dnsdistdist/meson/tm-gmtoff [new symlink]
pdns/dnsdistdist/meson/tm-gmtoff/meson.build [deleted file]
pdns/dnsdistdist/meson/various-functions [new symlink]
pdns/dnsdistdist/meson/various-functions/meson.build [deleted file]
pdns/dnsdistdist/meson/various-headers [new symlink]
pdns/dnsdistdist/meson/various-headers/meson.build [deleted file]
pdns/dnsdistdist/meson/version [new symlink]
pdns/dnsdistdist/meson/version/meson.build [deleted file]

diff --git a/pdns/dnsdistdist/meson/atomics b/pdns/dnsdistdist/meson/atomics
new file mode 120000 (symlink)
index 0000000..f66584b
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/atomics
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/atomics/atomic_add_fetch.cc b/pdns/dnsdistdist/meson/atomics/atomic_add_fetch.cc
deleted file mode 100644 (file)
index 0f560d3..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <cstdint>
-
-int main()
-{
-  uint64_t val = 0;
-  __atomic_add_fetch(&val, 1, __ATOMIC_RELAXED);
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/atomics/meson.build b/pdns/dnsdistdist/meson/atomics/meson.build
deleted file mode 100644 (file)
index 47bf92e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-dep_atomics = dependency('', required: false)
-need_latomic = false
-
-prog = fs.read('atomic_add_fetch.cc')
-if not cxx.links(prog, name: '-latomic is not needed for using __atomic builtins')
-  lib_atomic = cxx.find_library('atomic', disabler: true, required: false)
-  if lib_atomic.found()
-    if cxx.links(prog, name: '-latomic is needed for using __atomic builtins', dependencies: lib_atomic)
-      need_latomic = true
-      dep_atomics = declare_dependency(dependencies: lib_atomic)
-      summary('Atomics Library', lib_atomic, section: 'System')
-    else
-      error('libatomic is needed and was found, but linking with it failed')
-    endif
-  else
-    error('libatomic is needed but could not be found')
-  endif
-else
-  dep_atomics = declare_dependency()
-endif
-
-summary('Need -latomic', need_latomic, bool_yn: true, section: 'System')
diff --git a/pdns/dnsdistdist/meson/auto-var-init b/pdns/dnsdistdist/meson/auto-var-init
new file mode 120000 (symlink)
index 0000000..4dd2501
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/auto-var-init
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/auto-var-init/meson.build b/pdns/dnsdistdist/meson/auto-var-init/meson.build
deleted file mode 100644 (file)
index 56c3ade..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-auto_var_init = get_option('auto-var-init')
-
-if auto_var_init != 'disabled'
-  arg = '-ftrivial-auto-var-init=' + auto_var_init
-  if cxx.has_argument(arg)
-    add_project_arguments(arg, language: ['c', 'cpp'])
-  else
-    warning('Compiler does not support ' + arg + ', which is needed for automatic variable initialization')
-    auto_var_init = 'unsupported by compiler'
-  endif
-endif
-
-summary('Auto Var Init', auto_var_init, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/boost b/pdns/dnsdistdist/meson/boost
new file mode 120000 (symlink)
index 0000000..35cc454
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/boost
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/boost/meson.build b/pdns/dnsdistdist/meson/boost/meson.build
deleted file mode 100644 (file)
index 76e9757..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-dep_boost = dependency('boost', version: '>= 1.54', required: true)
-# conf.set('BOOST_CONTAINER_USE_STD_EXCEPTIONS', true, description: 'Boost use std exceptions')
-add_project_arguments('-DBOOST_CONTAINER_USE_STD_EXCEPTIONS', language: ['c', 'cpp'])
-summary('Boost', dep_boost.found(), bool_yn: true, section: 'Boost')
-summary('Version', dep_boost.version(), section: 'Boost')
diff --git a/pdns/dnsdistdist/meson/clock-gettime b/pdns/dnsdistdist/meson/clock-gettime
new file mode 120000 (symlink)
index 0000000..a88e7f3
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/clock-gettime
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/clock-gettime/meson.build b/pdns/dnsdistdist/meson/clock-gettime/meson.build
deleted file mode 100644 (file)
index b1249a0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-found = cxx.has_function('clock_gettime')
-dep_rt = dependency('', required: false)
-
-if not found
-  dep_rt = cxx.find_library('rt', required: true)
-  found = cxx.has_function('clock_gettime', dependencies: dep_rt)
-endif
-
-conf.set('HAVE_CLOCK_GETTIME', found, description: 'Have clock_gettime')
-summary('clock_gettime', true, bool_yn: true, section: 'System')
-
-if dep_rt.found()
-  summary('rt library', dep_rt.name(), bool_yn: true, section: 'System')
-  summary('rt library version', dep_rt.version(), bool_yn: true, section: 'System')
-endif
diff --git a/pdns/dnsdistdist/meson/code-coverage b/pdns/dnsdistdist/meson/code-coverage
new file mode 120000 (symlink)
index 0000000..dc72803
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/code-coverage
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/code-coverage/meson.build b/pdns/dnsdistdist/meson/code-coverage/meson.build
deleted file mode 100644 (file)
index 603dfc4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-coverage = get_option('b_coverage')
-
-if coverage
-  if get_option('buildtype') != 'debug'
-    warning('Coverage is enabled, using `builtype=debug` would produce better reports')
-  endif
-
-  if cxx.has_argument('-U_FORTIFY_SOURCE')
-    add_project_arguments('-U_FORTIFY_SOURCE', language: ['c', 'cpp'])
-  endif
-endif
-
-summary('Code Coverage', coverage, bool_yn: true, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/config b/pdns/dnsdistdist/meson/config
new file mode 120000 (symlink)
index 0000000..97b0070
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/config
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/config/meson.build b/pdns/dnsdistdist/meson/config/meson.build
deleted file mode 100644 (file)
index 09c7034..0000000
+++ /dev/null
@@ -1 +0,0 @@
-add_project_arguments('-DHAVE_CONFIG_H', language: ['c', 'cpp'])
diff --git a/pdns/dnsdistdist/meson/dlopen b/pdns/dnsdistdist/meson/dlopen
new file mode 120000 (symlink)
index 0000000..0b2f106
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/dlopen
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/dlopen/meson.build b/pdns/dnsdistdist/meson/dlopen/meson.build
deleted file mode 100644 (file)
index fdc7e0d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-dep_dlopen = declare_dependency()
-
-if not cxx.has_function('dlopen')
-  dep_dlopen = dependency('dl', required: false)
-
-  if not dep_dlopen.found()
-    dep_dlopen = cxx.find_library('dl', required: true)
-
-    if not cxx.has_function('dlopen', dependencies: dep_dlopen)
-      error('Your system does not support dlopen')
-    endif
-  endif
-endif
-
-summary('dlopen', dep_dlopen.found(), bool_yn: true, section: 'System')
diff --git a/pdns/dnsdistdist/meson/dnstap b/pdns/dnsdistdist/meson/dnstap
new file mode 120000 (symlink)
index 0000000..46d9991
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/dnstap
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/dnstap/meson.build b/pdns/dnsdistdist/meson/dnstap/meson.build
deleted file mode 100644 (file)
index e7a487e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-opt_dnstap = get_option('dnstap')
-dep_dnstap = dependency('libfstrm', required: opt_dnstap)
-
-if dep_dnstap.found()
-  funcs = [
-    'fstrm_tcp_writer_init',
-  ]
-
-  foreach func: funcs
-    has = cxx.has_function(func, dependencies: dep_dnstap)
-    conf.set('HAVE_' + func.to_upper(), has, description: 'Have libfstram ' + func)
-  endforeach
-endif
-
-conf.set('HAVE_FSTRM', dep_dnstap.found(), description: 'libfstrm')
-summary('DNSTAP', dep_dnstap.found(), bool_yn: true, section: 'Configuration')
-
diff --git a/pdns/dnsdistdist/meson/dot b/pdns/dnsdistdist/meson/dot
new file mode 120000 (symlink)
index 0000000..125641e
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/dot
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/dot/meson.build b/pdns/dnsdistdist/meson/dot/meson.build
deleted file mode 100644 (file)
index e1166a1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-opt_dot = get_option('dns-over-tls')
-conf.set('HAVE_DNS_OVER_TLS', opt_dot, description: 'DNS over TLS (DoT)')
-
-if opt_dot and not dep_libssl.found() and not dep_gnutls.found()
-  error('DNS over TLS support was requested but neither OpenSSL libssl nor GnuTLS support is enabled')
-endif
-
-summary('DNS over TLS', opt_dot, bool_yn: true, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/gnutls b/pdns/dnsdistdist/meson/gnutls
new file mode 120000 (symlink)
index 0000000..896dade
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/gnutls
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/gnutls/meson.build b/pdns/dnsdistdist/meson/gnutls/meson.build
deleted file mode 100644 (file)
index 8e1a229..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-opt_gnutls = get_option('tls-gnutls')
-dep_gnutls = dependency('gnutls', version: '>= 3.1.11', required: opt_gnutls)
-
-if dep_gnutls.found()
-  funcs = [
-    'gnutls_memset',
-    'gnutls_session_set_verify_cert',
-    'gnutls_session_get_verify_cert_status',
-    'gnutls_alpn_set_protocols',
-  ]
-
-  foreach func: funcs
-    has = cxx.has_function(func, dependencies: dep_gnutls)
-    conf.set('HAVE_' + func.to_upper(), has, description: 'Have GnuTLS ' + func)
-  endforeach
-endif
-
-conf.set('HAVE_GNUTLS', dep_gnutls.found(), description: 'GnuTLS')
-summary('GnuTLS', dep_gnutls.found(), bool_yn: true, section: 'Crypto')
diff --git a/pdns/dnsdistdist/meson/hardening b/pdns/dnsdistdist/meson/hardening
new file mode 120000 (symlink)
index 0000000..d1b676d
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/hardening
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/hardening/control-flow/meson.build b/pdns/dnsdistdist/meson/hardening/control-flow/meson.build
deleted file mode 100644 (file)
index 0c1ed36..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-opt_cf = get_option('hardening-experimental-cf')
-
-support_cf_prot = opt_cf != 'disabled' and cxx.has_argument('-fcf-protection=' + opt_cf)
-if support_cf_prot
-  add_project_arguments('-fcf-protection=' + opt_cf, language: ['c', 'cpp'])
-elif opt_cf != 'disabled'
-  error('Control Flow Protection was explicitly requested but is not supported by the compiler')
-endif
-
-summary('Control Flow Protection', support_cf_prot, bool_yn: true, section: 'Hardening')
diff --git a/pdns/dnsdistdist/meson/hardening/fortify-source/meson.build b/pdns/dnsdistdist/meson/hardening/fortify-source/meson.build
deleted file mode 100644 (file)
index 2ef4ea9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-fortify_source_opt = get_option('hardening-fortify-source')
-fortify_source = fortify_source_opt != 'disabled'
-fortify_source_level = 0
-
-if fortify_source and get_option('buildtype') == 'debug'
-  error('Source fortification was requested but it requires compiling with optimization. ' +
-        'A debug buildtype was requested, try setting buildtype=debugoptimized instead')
-endif
-
-if fortify_source
-  fortify_source_level = 2
-  if fortify_source_opt == 'auto'
-    fortify_source_level = 3
-  else
-    fortify_source_level = fortify_source_opt.to_int()
-  endif
-
-  variants = [3, 2, 1]
-  foreach variant: variants
-    variant_str = variant.to_string()
-    if fortify_source_level == variant
-      if cxx.has_argument('-D_FORTIFY_SOURCE=' + variant_str)
-        add_project_arguments('-U_FORTIFY_SOURCE', '-D_FORTIFY_SOURCE=' + variant_str, language: ['c', 'cpp'])
-        break
-      else
-        fortify_source_level = fortify_source_level - 1
-      endif
-    endif
-  endforeach
-endif
-
-fortify_source = fortify_source and fortify_source_level != 0
-summary('Source Fortification', fortify_source, bool_yn: true, section: 'Hardening')
-
-if fortify_source
-  summary('Source Fortification Level', fortify_source_level, section: 'Hardening')
-endif
diff --git a/pdns/dnsdistdist/meson/hardening/meson.build b/pdns/dnsdistdist/meson/hardening/meson.build
deleted file mode 100644 (file)
index 1859c63..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-opt_hardening = get_option('hardening')
-if opt_hardening.enabled() or opt_hardening.auto()
-  hardening_features = []
-
-  # PIE
-  opt_pie = get_option('b_pie')
-  if not opt_pie and opt_hardening.enabled()
-    error('Hardening was requested but building position independent executables is disabled')
-  endif
-  hardening_features += [[opt_pie, 'Building position independent executables (PIEs)']]
-  conf.set('PIE', opt_pie, description: 'Build a Position Independent Executable (PIE)')
-  summary('PIE', opt_pie, bool_yn: true, section: 'Hardening')
-
-  subdir('stack-prot')          # Stack Protector
-  subdir('stack-smashing-prot') # Stack-Smashing Protection
-  subdir('relro')               # RELRO
-
-  foreach feature: hardening_features
-    available = feature[0]
-    name = feature[1]
-
-    if not available
-      if opt_hardening.auto()
-        warning(name + ' is disabled or not supported')
-      else
-        error('Failing because ' + name + ' is not supported but hardening was requested')
-      endif
-    endif
-  endforeach
-endif
-
-subdir('fortify-source')      # Fortify Source
-subdir('control-flow')        # Control Flow Protection
-subdir('stack-clash-prot')    # Stack Clash Protection
diff --git a/pdns/dnsdistdist/meson/hardening/relro/meson.build b/pdns/dnsdistdist/meson/hardening/relro/meson.build
deleted file mode 100644 (file)
index 23e57a6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-have_relro = true
-variants = [
-  '-Wl,-z,relro',
-  '-Wl,-z,now',
-]
-
-foreach variant: variants
-  if cxx.has_link_argument(variant)
-    hardening_features += [[true, 'RELRO (' + variant + ')']]
-    add_project_link_arguments(variant, language: ['c', 'cpp'])
-  else
-    have_relro = false
-  endif
-endforeach
-
-summary('RELRO', have_relro, bool_yn: true, section: 'Hardening')
diff --git a/pdns/dnsdistdist/meson/hardening/stack-clash-prot/meson.build b/pdns/dnsdistdist/meson/hardening/stack-clash-prot/meson.build
deleted file mode 100644 (file)
index cce9ae1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-opt_scp = get_option('hardening-experimental-scp')
-
-support_scp = not opt_scp.disabled() and cxx.has_argument('-fstack-clash-protection')
-if support_scp
-  add_project_arguments('-fstack-clash-protection', language: ['c', 'cpp'])
-elif opt_scp.enabled()
-  error('Stack Clash Protection was explicitly requested but is not supported by the compiler')
-endif
-
-summary('Stack Clash Protection', support_scp, bool_yn: true, section: 'Hardening')
diff --git a/pdns/dnsdistdist/meson/hardening/stack-prot/meson.build b/pdns/dnsdistdist/meson/hardening/stack-prot/meson.build
deleted file mode 100644 (file)
index 43d8253..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-support_stack_protector = cxx.has_argument('-fstack-protector')
-
-if support_stack_protector
-  add_project_arguments('-fstack-protector', language: ['c', 'cpp'])
-endif
-
-hardening_features += [[support_stack_protector, 'Stack Protector']]
-summary('Stack Protector', support_stack_protector, bool_yn: true, section: 'Hardening')
diff --git a/pdns/dnsdistdist/meson/hardening/stack-smashing-prot/meson.build b/pdns/dnsdistdist/meson/hardening/stack-smashing-prot/meson.build
deleted file mode 100644 (file)
index fb24faa..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-support_stack_smashing_protector = cxx.has_argument('--param=ssp-buffer-size=4')
-if support_stack_smashing_protector
-  add_project_arguments('--param=ssp-buffer-size=4', language: ['c', 'cpp'])
-endif
-
-hardening_features += [[support_stack_smashing_protector, 'Stack Smashing Protection']]
-summary('Stack Smashing Protection', support_stack_smashing_protector, bool_yn: true, section: 'Hardening')
-if support_stack_smashing_protector
-  summary('SSP Buffer Size', 4, section: 'Hardening')
-endif
diff --git a/pdns/dnsdistdist/meson/ipcipher b/pdns/dnsdistdist/meson/ipcipher
new file mode 120000 (symlink)
index 0000000..ecd1d70
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/ipcipher
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/ipcipher/meson.build b/pdns/dnsdistdist/meson/ipcipher/meson.build
deleted file mode 100644 (file)
index 0d67db5..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-opt_ipcipher = get_option('ipcipher')
-
-if not dep_libcrypto.found() and opt_ipcipher.enabled()
-  error('ipcipher support was requested but libcrypto is not available')
-endif
-
-enable_ipcipher = dep_libcrypto.found() and not opt_ipcipher.disabled()
-conf.set('HAVE_IPCIPHER', enable_ipcipher, description: 'ipcipher support')
-summary('ipcipher', enable_ipcipher, bool_yn: true, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/kiss-rng b/pdns/dnsdistdist/meson/kiss-rng
new file mode 120000 (symlink)
index 0000000..268370c
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/kiss-rng
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/kiss-rng/meson.build b/pdns/dnsdistdist/meson/kiss-rng/meson.build
deleted file mode 100644 (file)
index d11cdad..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-opt_kiss_rng = get_option('rng-kiss')
-conf.set('HAVE_KISS_RNG', opt_kiss_rng, description: 'Use the unsafe KISS RNG')
-summary('Unsafe KISS RNG', opt_kiss_rng, bool_yn: true, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/libdir b/pdns/dnsdistdist/meson/libdir
new file mode 120000 (symlink)
index 0000000..9edafc7
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/libdir
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/libdir/meson.build b/pdns/dnsdistdist/meson/libdir/meson.build
deleted file mode 100644 (file)
index 7e370c4..0000000
+++ /dev/null
@@ -1 +0,0 @@
-conf.set_quoted('PKGLIBDIR', get_option('libdir'), description: 'Modules directory')
diff --git a/pdns/dnsdistdist/meson/libssl b/pdns/dnsdistdist/meson/libssl
new file mode 120000 (symlink)
index 0000000..c594bbd
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/libssl
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/libssl/meson.build b/pdns/dnsdistdist/meson/libssl/meson.build
deleted file mode 100644 (file)
index 387d551..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-opt_libssl = get_option('tls-libssl')
-dep_libssl = dependency('libssl', required: opt_libssl)
-
-if dep_libssl.found()
-  funcs = [
-    'SSL_CTX_set_ciphersuites',
-    'SSL_CTX_set_num_tickets',
-    'SSL_CTX_set_keylog_callback',
-    'SSL_CTX_get0_privatekey',
-    'SSL_set_hostflags',
-    'SSL_CTX_set_alpn_protos',
-    'SSL_CTX_set_next_proto_select_cb',
-    'SSL_get0_alpn_selected',
-    'SSL_get0_next_proto_negotiated',
-    'SSL_CTX_set_alpn_select_cb',
-    'SSL_CTX_use_cert_and_key',
-  ]
-
-  foreach func: funcs
-    has = cxx.has_function(func, dependencies: dep_libssl)
-    conf.set('HAVE_' + func.to_upper(), has, description: 'Have OpenSSL libssl ' + func)
-  endforeach
-endif
-
-has = cxx.has_header_symbol(
-  'openssl/ssl.h',
-  'SSL_CTX_set_min_proto_version',
-  dependencies: dep_libssl,
-)
-conf.set(
-  'HAVE_SSL_CTX_SET_MIN_PROTO_VERSION',
-  has,
-  description: 'Have OpenSSL libssl SSL_CTX_set_min_proto_version',
-)
-conf.set(
-  'OPENSSL_NO_ENGINE',
-  true,
-  description: 'Disable engine support for auth in libssl.cc',
-)
-
-conf.set('HAVE_LIBSSL', dep_libssl.found(), description: 'OpenSSL libssl')
-summary('OpenSSL libssl', dep_libssl.found(), bool_yn: true, section: 'Crypto')
diff --git a/pdns/dnsdistdist/meson/libsystemd b/pdns/dnsdistdist/meson/libsystemd
new file mode 120000 (symlink)
index 0000000..a2be793
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/libsystemd
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/libsystemd/meson.build b/pdns/dnsdistdist/meson/libsystemd/meson.build
deleted file mode 100644 (file)
index a4649a4..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-opt_systemd = get_option('systemd')
-
-dep_systemd = dependency('libsystemd', required: opt_systemd)
-conf.set('HAVE_SYSTEMD', dep_systemd.found(), description: 'libsystemd')
-summary('libsystemd', dep_systemd.found(), bool_yn: true, section: 'Configuration')
-
-if dep_systemd.found()
-  summary('Lib Version', dep_systemd.version(), section: 'Systemd')
-endif
diff --git a/pdns/dnsdistdist/meson/mmap b/pdns/dnsdistdist/meson/mmap
new file mode 120000 (symlink)
index 0000000..e8c0d47
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/mmap
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/mmap/meson.build b/pdns/dnsdistdist/meson/mmap/meson.build
deleted file mode 100644 (file)
index 69eae7c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-mman_h = cxx.has_header('sys/mman.h', required: false)
-have_mmap = mman_h and cxx.has_function('mmap', prefix: '''#include <sys/mman.h>''')
-
-conf.set('HAVE_MMAP', have_mmap, description: 'Have mmap')
-
-summary('Have <sys/mman.h>', mman_h, bool_yn: true, section: 'Function mmap')
-summary('mmap', have_mmap, bool_yn: true, section: 'Function mmap')
diff --git a/pdns/dnsdistdist/meson/net-libs b/pdns/dnsdistdist/meson/net-libs
new file mode 120000 (symlink)
index 0000000..537e40d
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/net-libs
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/net-libs/meson.build b/pdns/dnsdistdist/meson/net-libs/meson.build
deleted file mode 100644 (file)
index fd494ce..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-netlib_deps = []
-
-variants = [
-  ['inet_aton', 'resolv'],
-  ['gethostbyname', 'nsl'],
-  ['socket', 'socket'],
-  ['gethostent', 'nsl'],
-]
-
-foreach variant: variants
-  func_name = variant[0]
-  lib_name = variant[1]
-
-  found = cxx.has_function(func_name)
-  if not found
-    lib = cxx.find_library(lib_name, required: true)
-    if not cxx.has_function(func_name, dependencies: lib)
-      error('Cannot find function ' + func_name + ', searched library `' + lib_name + '`')
-    endif
-    netlib_deps += lib
-    found = lib.name() + ' ' + lib.version()
-  endif
-
-  summary(func_name, found, bool_yn: true, section: 'Networking Functions')
-endforeach
-
-dep_netlibs = declare_dependency(dependencies: netlib_deps)
-
-variants = [
-  'recvmmsg',
-  'sendmmsg',
-  'accept4',
-]
-
-foreach variant: variants
-  found = cxx.has_function(variant)
-  define = 'HAVE_' + variant.to_upper()
-  conf.set(define, found, description: 'Have ' + variant)
-  summary(variant, found, bool_yn: true, section: 'Networking Functions')
-endforeach
-
-declared = cxx.has_header_symbol('ifaddrs.h', 'getifaddrs')
-conf.set('HAVE_GETIFADDRS', declared, description: 'Have getifaddrs')
-summary('getifaddrs', declared, bool_yn: true, section: 'Networking Functions')
diff --git a/pdns/dnsdistdist/meson/platform b/pdns/dnsdistdist/meson/platform
new file mode 120000 (symlink)
index 0000000..89e25b3
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/platform
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/platform/meson.build b/pdns/dnsdistdist/meson/platform/meson.build
deleted file mode 100644 (file)
index ea2a123..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-platforms = [
-  {
-    'name': 'linux',
-    'config-defines': [{ 'name': 'HAVE_LINUX', 'description': 'On Linux' }],
-  },
-  {
-    'name': 'darwin',
-    'config-defines': [{ 'name': 'HAVE_DARWIN', 'description': 'On Darwin/MacOS' }],
-    'cmdline-defines': ['__APPLE_USE_RFC_3542', '_XOPEN_SOURCE', '_DARWIN_C_SOURCE'],
-  },
-  {
-    'name': 'openbsd',
-    'config-defines': [{ 'name': 'HAVE_OPENBSD', 'description': 'On OpenBSD' }],
-  },
-  {
-    'name': 'freebsd',
-    'config-defines': [{ 'name': 'HAVE_FREEBSD', 'description': 'On FreeBSD' }],
-  },
-  {
-    'name': 'sunos',
-    'config-defines': [
-      { 'name': 'HAVE_SOLARIS', 'description': 'On Solaris/SunOS' },
-      { 'name': 'NEED_POSIX_TYPEDEF', 'description': 'POSIX typedefs need to be defined' },
-      { 'name': 'NEED_INET_NTOP_PROTO', 'description': 'OS is so broken that it needs an additional prototype' },
-    ],
-    'cmdline-defines': ['_REENTRANT'],
-    'libraries': ['posix4'],
-  },
-]
-
-platform_deps = []
-
-foreach platform: platforms
-  name = platform['name']
-  set_variable('have_' + name, system == name)
-
-  config_defines = 'config-defines' in platform ? platform['config-defines'] : []
-  cmdline_defines = 'cmdline-defines' in platform ? platform['cmdline-defines'] : []
-  libraries = 'libraries' in platform ? platform['libraries'] : []
-
-  if system == name
-    platform_defines = []
-    foreach define: config_defines
-      define_name = define['name']
-      define_desc = define['description']
-      conf.set(define_name, true, description: define_desc)
-      platform_defines += define_name
-    endforeach
-
-    foreach cmdline_define: cmdline_defines
-      add_project_arguments('-D' + cmdline_define, language: ['c', 'cpp'])
-    endforeach
-
-    foreach library: libraries
-      platform_deps += cxx.find_library(library, required: true)
-    endforeach
-
-    summary('Platform Defines', platform_defines, section: 'System')
-  endif
-endforeach
-
-dep_platform = declare_dependency(
-  dependencies: platform_deps,
-)
diff --git a/pdns/dnsdistdist/meson/pthread-headers b/pdns/dnsdistdist/meson/pthread-headers
new file mode 120000 (symlink)
index 0000000..509fbec
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/pthread-headers
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/pthread-headers/meson.build b/pdns/dnsdistdist/meson/pthread-headers/meson.build
deleted file mode 100644 (file)
index 9b2bdc0..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-dep_threads = dependency('threads')
-
-have_pthread_h = cxx.check_header(
-  'pthread.h',
-  dependencies: dep_threads,
-  required: true,
-)
-have_pthread_np_h = cxx.check_header(
-  'pthread_np.h',
-  dependencies: dep_threads,
-  prefix: '#include <pthread.h>',
-)
-
-conf.set('HAVE_PTHREAD_NP_H', have_pthread_np_h, description: 'Have <pthread_np.h>')
-
-summary('Threads', dep_threads.found(), bool_yn: true, section: 'POSIX Threads')
-summary('Have <pthread.h>', have_pthread_h, bool_yn: true, section: 'POSIX Threads')
-summary('Have <pthread_np.h>', have_pthread_np_h, bool_yn: true, section: 'POSIX Threads')
diff --git a/pdns/dnsdistdist/meson/pthread-np b/pdns/dnsdistdist/meson/pthread-np
new file mode 120000 (symlink)
index 0000000..268e4f6
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/pthread-np
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/pthread-np/meson.build b/pdns/dnsdistdist/meson/pthread-np/meson.build
deleted file mode 100644 (file)
index 7dc7892..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-funcs = [
-  'pthread_setaffinity_np',
-  'pthread_getattr_np',
-  'pthread_get_stackaddr_np',
-  'pthread_get_stacksize_np',
-]
-
-foreach func: funcs
-  found = cxx.has_function(func, dependencies: dep_threads)
-  define = 'HAVE_' + func.to_upper()
-  conf.set(define, found, description: 'Have ' + func)
-  summary(func, found, bool_yn: true, section: 'POSIX Threads')
-endforeach
diff --git a/pdns/dnsdistdist/meson/pthread-setname b/pdns/dnsdistdist/meson/pthread-setname
new file mode 120000 (symlink)
index 0000000..275555d
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/pthread-setname
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/pthread-setname/meson.build b/pdns/dnsdistdist/meson/pthread-setname/meson.build
deleted file mode 100644 (file)
index 2f161d7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-variants = [
-  [
-    '2-arg pthread_setname_np',
-    'HAVE_PTHREAD_SETNAME_NP_2',
-    'pthread_setname_np takes 2 arguments (Linux/glibc, QNX, IBM)',
-    fs.read('pthread_setname_np_2args.cc'),
-  ],
-  [
-    '2-arg pthread_set_name_np',
-    'HAVE_PTHREAD_SET_NAME_NP_2',
-    'pthread_set_name_np takes 2 arguments and does not return void (FreeBSD, OpenBSD)',
-    fs.read('pthread_set_name_np_2args.cc'),
-  ],
-  [
-    '2-arg void pthread_set_name_np',
-    'HAVE_PTHREAD_SET_NAME_NP_2_VOID',
-    'pthread_set_name_np takes 2 arguments and returns void (FreeBSD, OpenBSD)',
-    fs.read('pthread_set_name_np_void_2args.cc'),
-  ],
-  [
-    '1-arg pthread_setname_np',
-    'HAVE_PTHREAD_SETNAME_NP_1',
-    'pthread_setname_np takes 1 argument (Darwin, MacOS)',
-    fs.read('pthread_setname_np_1arg.cc'),
-  ],
-  [
-    '3-arg pthread_setname_np',
-    'HAVE_PTHREAD_SETNAME_NP_3',
-    'pthread_setname_np takes 3 arguments (NetBSD)',
-    fs.read('pthread_setname_np_3args.cc'),
-  ],
-]
-
-found = false
-foreach variant: variants
-  variant_name = variant[0]
-  variant_define = variant[1]
-  variant_description = variant[2]
-  variant_program = variant[3]
-
-  if cxx.links(
-    variant_program,
-    name: variant_name,
-    dependencies: dep_threads,
-    args: have_pthread_np_h ? ['-DHAVE_PTHREAD_NP_H'] : []
-  )
-    found = true
-    conf.set(variant_define, true, description: variant_description)
-    summary('pthread_setname Variant', variant_define, section: 'POSIX Threads')
-    summary('Description', variant_description, section: 'POSIX Threads')
-    break
-  endif
-endforeach
-
-if not found
-  error('Could not find a suitable pthread_setname function')
-endif
diff --git a/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_2args.cc b/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_2args.cc
deleted file mode 100644 (file)
index e028024..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <pthread.h>
-#if HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-int main()
-{
-  return pthread_set_name_np(pthread_self(), "foo");
-}
diff --git a/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_void_2args.cc b/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_void_2args.cc
deleted file mode 100644 (file)
index 7c26bbd..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <pthread.h>
-#if HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-int main()
-{
-  pthread_set_name_np(pthread_self(), "foo");
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_1arg.cc b/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_1arg.cc
deleted file mode 100644 (file)
index d82b9ac..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <pthread.h>
-#if HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-int main()
-{
-  return pthread_setname_np("foo");
-}
diff --git a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_2args.cc b/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_2args.cc
deleted file mode 100644 (file)
index 366e44a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <pthread.h>
-#if HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-int main()
-{
-  pthread_setname_np(pthread_self(), "foo");
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_3args.cc b/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_3args.cc
deleted file mode 100644 (file)
index fea912e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <pthread.h>
-#if HAVE_PTHREAD_NP_H
-#include <pthread_np.h>
-#endif
-
-int main()
-{
-  return pthread_setname_np(pthread_self(), "foo", NULL);
-}
diff --git a/pdns/dnsdistdist/meson/reproducible b/pdns/dnsdistdist/meson/reproducible
new file mode 120000 (symlink)
index 0000000..d9edaa0
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/reproducible
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/reproducible/meson.build b/pdns/dnsdistdist/meson/reproducible/meson.build
deleted file mode 100644 (file)
index 1b53312..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-opt_repro = get_option('reproducible')
-conf.set('REPRODUCIBLE', opt_repro, description: 'Reproducible builds')
-summary('Reproducible Builds', opt_repro, bool_yn: true, section: 'Reproducible Builds')
-
-if not opt_repro
-  id_prog = find_program('id', required: opt_repro)
-  id_prog_res = run_command(id_prog, '-u', '-n', check: true)
-  build_user = id_prog_res.stdout().strip()
-
-  build_host = ''
-  hostname_prog = find_program('hostname', required: opt_repro)
-  build_system = build_machine.system()
-  if build_system == 'sunos' or build_system == 'openbsd'
-    domainname_prog = find_program('domainname', required: opt_repro)
-
-    hostname_prog_res = run_command(hostname_prog, check: true)
-    domainname_prog_res = run_command(domainname_prog, check: true)
-
-    build_host_hostname = hostname_prog_res.stdout().strip()
-    build_host_domainname = domainname_prog_res.stdout().strip()
-
-    build_host = build_host_hostname + '.' + build_host_domainname
-  else
-    cmds = [
-      [hostname_prog, '-f'],
-      [hostname_prog],
-      ['echo', '\'localhost\''],
-    ]
-
-    found = false
-    foreach cmd: cmds
-      res = run_command(cmd, check: false)
-      if res.returncode() == 0
-        build_host = res.stdout().strip()
-        found = true
-        break
-      endif
-    endforeach
-
-    if not found
-      error('Reproducible builds requested but could not figure out a build host string on ' + build_system)
-    endif
-  endif
-
-  build_host = build_user + '@' + build_host
-  conf.set_quoted('BUILD_HOST', build_host, description: 'User and host who built PowerDNS')
-  summary('Build Host', build_host, section: 'Reproducible Builds')
-endif
diff --git a/pdns/dnsdistdist/meson/sanitizers b/pdns/dnsdistdist/meson/sanitizers
new file mode 120000 (symlink)
index 0000000..0a784a7
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/sanitizers
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/meson.build b/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/meson.build
deleted file mode 100644 (file)
index 2cd8078..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-prog_single_pointer = fs.read('sanitizer_finish_switch_fiber_1ptr.cc')
-prog_three_pointers = fs.read('sanitizer_finish_switch_fiber_3ptrs.cc')
-
-single_pointer = false
-three_pointers = false
-
-if cxx.check_header('sanitizer/common_interface_defs.h', required: false)
-  if cxx.has_header_symbol('sanitizer/common_interface_defs.h', '__sanitizer_start_switch_fiber', required: false)
-    if cxx.compiles(prog_single_pointer, name: '__sanitizer_finish_switch_fiber with a single pointer')
-      single_pointer = true
-    endif
-
-    if cxx.compiles(prog_three_pointers, name: '__sanitizer_finish_switch_fiber with three pointers')
-      three_pointers = true
-    endif
-  else
-    warning('Address Sanitizer fiber switching is not available')
-  endif
-
-else
-  warning('Address Sanitizer requested but `sanitizer/common_interface_defs.h` ' +
-          'is invalid or cannot be found. Address Sanitizer fiber switching is ' +
-          'not available')
-endif
-
-if not single_pointer and not three_pointers
-  warning('Address Sanitizer fiber switching is not available due to an unknown API version')
-endif
-
-conf.set(
-  'HAVE_FIBER_SANITIZER',
-  single_pointer or three_pointers,
-  description: 'Address Sanitizer fiber annotation interface is available',
-)
-conf.set(
-  'HAVE_SANITIZER_FINISH_SWITCH_FIBER_SINGLE_PTR',
-  single_pointer,
-  description: 'Address Sanitizer: __sanitizer_finish_switch_fiber takes only a pointer',
-)
-conf.set(
-  'HAVE_SANITIZER_FINISH_SWITCH_FIBER_THREE_PTRS',
-  three_pointers,
-  description: 'Address Sanitizer: __sanitizer_finish_switch_fiber takes three pointers',
-)
diff --git a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_1ptr.cc b/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_1ptr.cc
deleted file mode 100644 (file)
index 80f453b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sanitizer/common_interface_defs.h>
-
-int main()
-{
-  __sanitizer_finish_switch_fiber(nullptr);
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_3ptrs.cc b/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_3ptrs.cc
deleted file mode 100644 (file)
index 3c0ca7d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sanitizer/common_interface_defs.h>
-
-int main()
-{
-  __sanitizer_finish_switch_fiber(nullptr, nullptr, nullptr);
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/sanitizers/meson.build b/pdns/dnsdistdist/meson/sanitizers/meson.build
deleted file mode 100644 (file)
index d708ba7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-opt_sanitize = get_option('b_sanitize')
-
-if opt_sanitize == 'address' or opt_sanitize == 'address,undefined'
-  subdir('address-sanitizer-fiber-switching')
-endif
-
-if opt_sanitize != 'none'
-  add_project_arguments('-fno-omit-frame-pointer', language: ['c', 'cpp'])
-endif
-
-summary('Sanitizers', opt_sanitize, bool_yn: true, section: 'Configuration')
diff --git a/pdns/dnsdistdist/meson/strerror b/pdns/dnsdistdist/meson/strerror
new file mode 120000 (symlink)
index 0000000..598b9f3
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/strerror
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/strerror/meson.build b/pdns/dnsdistdist/meson/strerror/meson.build
deleted file mode 100644 (file)
index 0d10cf1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-prog = fs.read('strerror_r.c')
-
-have_strerror_r_decl = cxx.has_header_symbol('string.h', 'strerror_r')
-have_strerror_r = cxx.has_function('strerror_r', prefix: '#include <string.h>')
-strerror_r_returns_charp = have_strerror_r and cxx.compiles(prog, name: 'strerror_r() returns char *')
-
-conf.set('HAVE_DECL_STRERROR_R', have_strerror_r_decl, description: 'Whether strerror_r is declared')
-conf.set('HAVE_STRERROR_R', have_strerror_r, description: 'Whether strerror_r is available')
-conf.set('STRERROR_R_CHAR_P', strerror_r_returns_charp, description: 'Whether strerror_r returns char *')
-
-summary('Symbol', have_strerror_r_decl, bool_yn: true, section: 'Function strerror_r')
-summary('Declaration', have_strerror_r, bool_yn: true, section: 'Function strerror_r')
-summary('Returns char *', strerror_r_returns_charp, bool_yn: true, section: 'Function strerror_r')
diff --git a/pdns/dnsdistdist/meson/strerror/strerror_r.c b/pdns/dnsdistdist/meson/strerror/strerror_r.c
deleted file mode 100644 (file)
index d6a5dce..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <string.h>
-
-int main () {
-  char error_string[256];
-  char *ptr = strerror_r(-2, error_string, 256);
-  char c = *strerror_r(-2, error_string, 256);
-  return c != 0 && ptr != (void*) 0L;
-}
diff --git a/pdns/dnsdistdist/meson/summary b/pdns/dnsdistdist/meson/summary
new file mode 120000 (symlink)
index 0000000..3f61f3e
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/summary
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/summary/meson.build b/pdns/dnsdistdist/meson/summary/meson.build
deleted file mode 100644 (file)
index 01c1960..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-summary('System', system, section: 'System')
-summary('C++ Compiler', cxx.get_id(), section: 'System')
-summary('C++ Compiler Version', cxx.version(), section: 'System')
-summary('C++ Compiler Command', ' '.join(cxx.cmd_array()), section: 'System')
-summary('Linker', cxx.get_linker_id(), section: 'System')
diff --git a/pdns/dnsdistdist/meson/sysconfdir b/pdns/dnsdistdist/meson/sysconfdir
new file mode 120000 (symlink)
index 0000000..a44a2e4
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/sysconfdir
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/sysconfdir/meson.build b/pdns/dnsdistdist/meson/sysconfdir/meson.build
deleted file mode 100644 (file)
index 9b313ee..0000000
+++ /dev/null
@@ -1 +0,0 @@
-conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'), description: 'Configuration data directory')
diff --git a/pdns/dnsdistdist/meson/systemd b/pdns/dnsdistdist/meson/systemd
new file mode 120000 (symlink)
index 0000000..11db1eb
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/systemd
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/systemd/meson.build b/pdns/dnsdistdist/meson/systemd/meson.build
deleted file mode 100644 (file)
index 3cb0113..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-dep_systemd_prog = dependency('systemd', required: false)
-summary('Systemd', dep_systemd_prog.found(), bool_yn: true, section: 'Configuration')
-
-# Map systemd features to systemd/systemctl version.
-systemd_features = {
-  'private_tmp': 183,
-  'system_call_architectures': 209,
-  'private_devices': 209,
-  'restrict_address_families': 211,
-  'protect_system': 214,
-  'protect_home': 214,
-  'restrict_realtime': 231,
-  'memory_deny_write_execute': 231,
-  'protect_control_groups': 232,
-  'protect_kernel_modules': 232,
-  'protect_kernel_tunables': 232,
-  'remove_ipc': 232,
-  'dynamic_user': 232,
-  'private_users': 232,
-  'protect_system_strict': 232,
-  'restrict_namespaces': 233,
-  'lock_personality': 235,
-  # while SystemCallFilter is technically available starting with 187,
-  # we use the pre-defined call filter sets that have been introduced later.
-  # Initial support for these landed in 231
-  # @filesystem @reboot @swap in 233
-  # @aio, @sync, @chown, @setuid, @memlock, @signal and @timer in 235
-  'system_call_filter': 235,
-  'percent_t': 236,
-  'private_mounts': 239,
-  'with_runtime_dir_env': 240,
-  'protect_hostname': 242,
-  'restrict_suidsgid': 242,
-  'protect_kernel_logs': 244,
-  'protect_clock': 245,
-  'protect_proc': 247,
-  'private_ipc': 248,
-}
-
-systemd_version = dep_systemd_prog.version()
-foreach feature, version: systemd_features
-  feature_name = 'have_systemd_' + feature
-  feature_value = systemd_version.version_compare('>=' + version.to_string())
-  set_variable(feature_name, feature_value)
-  conf.set(feature_name.to_upper(), feature_value, description: 'systemd feature: ' + feature)
-endforeach
-
-if dep_systemd_prog.found()
-  summary('Version', dep_systemd_prog.version(), section: 'Systemd')
-endif
diff --git a/pdns/dnsdistdist/meson/timet-sign b/pdns/dnsdistdist/meson/timet-sign
new file mode 120000 (symlink)
index 0000000..c0fb86f
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/timet-sign
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/timet-sign/meson.build b/pdns/dnsdistdist/meson/timet-sign/meson.build
deleted file mode 100644 (file)
index d667048..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-fs = import('fs')
-
-prog = fs.read('timet_sign.cc')
-timet_signed = cxx.compiles(prog, name: 'time_t is signed')
-
-if not timet_signed
-  error('time_t is unsigned, PowerDNS code relies on it being signed')
-endif
-
-summary('Signed time_t', timet_signed, bool_yn: true, section: 'System')
diff --git a/pdns/dnsdistdist/meson/timet-sign/timet_sign.cc b/pdns/dnsdistdist/meson/timet-sign/timet_sign.cc
deleted file mode 100644 (file)
index 3df0895..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <sys/types.h>
-
-int main()
-{
-  int foo[1 - 2 * !(((time_t)-1) < 0)];
-  (void)foo[0];
-  return 0;
-}
diff --git a/pdns/dnsdistdist/meson/timet-size b/pdns/dnsdistdist/meson/timet-size
new file mode 120000 (symlink)
index 0000000..c4662a4
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/timet-size
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/timet-size/meson.build b/pdns/dnsdistdist/meson/timet-size/meson.build
deleted file mode 100644 (file)
index 5f0c060..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-timet_size = cxx.sizeof('time_t', prefix: '#include <sys/types.h>')
-
-if timet_size < 8
-  error('size of time_t is ' +
-        timet_size.to_string() +
-        ' which is not large enough to fix the y2k38 bug')
-endif
-
-summary('Size of time_t', timet_size, section: 'System')
diff --git a/pdns/dnsdistdist/meson/tm-gmtoff b/pdns/dnsdistdist/meson/tm-gmtoff
new file mode 120000 (symlink)
index 0000000..e0b0dbc
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/tm-gmtoff
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/tm-gmtoff/meson.build b/pdns/dnsdistdist/meson/tm-gmtoff/meson.build
deleted file mode 100644 (file)
index e583aa0..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-prefix = '''
-#include <sys/types.h>
-#include <time.h>
-'''
-
-has = cxx.has_member('struct tm', 'tm_gmtoff', prefix: prefix)
-conf.set('HAVE_TM_GMTOFF', has, description: 'Whether tm_gmtoff is available')
-summary('tm_gmtoff', has, bool_yn: true, section: 'System')
diff --git a/pdns/dnsdistdist/meson/various-functions b/pdns/dnsdistdist/meson/various-functions
new file mode 120000 (symlink)
index 0000000..9c14861
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/various-functions
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/various-functions/meson.build b/pdns/dnsdistdist/meson/various-functions/meson.build
deleted file mode 100644 (file)
index 8c268d5..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-funcs = [
-  'strcasestr',
-  'localtime_r',
-  'gmtime_r',
-  'recvmmsg',
-  'sched_setscheduler',
-  'getrandom',
-  'arc4random',
-  'getentropy',
-  'arc4random_uniform',
-  'arc4random_buf',
-  'explicit_bzero',
-  'explicit_memset',
-  'memset_s',
-]
-
-foreach func: funcs
-  found = cxx.has_function(func)
-  define = 'HAVE_' + func.to_upper()
-  conf.set(define, found, description: 'Have ' + func)
-  summary(func, found, bool_yn: true, section: 'Various Functions')
-endforeach
diff --git a/pdns/dnsdistdist/meson/various-headers b/pdns/dnsdistdist/meson/various-headers
new file mode 120000 (symlink)
index 0000000..3ab8341
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/various-headers
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/various-headers/meson.build b/pdns/dnsdistdist/meson/various-headers/meson.build
deleted file mode 100644 (file)
index 569c7f0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-conf.set(
-  'HAVE_SYS_RANDOM_H',
-  cxx.has_header('sys/random.h'),
-  description: 'Have sys/random.h',
-)
diff --git a/pdns/dnsdistdist/meson/version b/pdns/dnsdistdist/meson/version
new file mode 120000 (symlink)
index 0000000..39c9fdf
--- /dev/null
@@ -0,0 +1 @@
+../../../meson/version
\ No newline at end of file
diff --git a/pdns/dnsdistdist/meson/version/meson.build b/pdns/dnsdistdist/meson/version/meson.build
deleted file mode 100644 (file)
index 5fdf569..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-gen_version_prog = find_program('gen-version', dirs: product_source_dir / 'builder-support', required: true)
-gen_version_prog_res = run_command(gen_version_prog, check: true)
-product_version = gen_version_prog_res.stdout().strip()
-conf.set_quoted('VERSION', product_version, description: 'Version')