From c0e1848e8deab2fc3cd7a070e1d95ca3583a9331 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 14 Oct 2024 11:29:27 +0200 Subject: [PATCH] dnsdist: Remove duplicated meson directories and files --- pdns/dnsdistdist/meson/atomics | 1 + .../meson/atomics/atomic_add_fetch.cc | 8 --- pdns/dnsdistdist/meson/atomics/meson.build | 22 ------- pdns/dnsdistdist/meson/auto-var-init | 1 + .../meson/auto-var-init/meson.build | 13 ---- pdns/dnsdistdist/meson/boost | 1 + pdns/dnsdistdist/meson/boost/meson.build | 5 -- pdns/dnsdistdist/meson/clock-gettime | 1 + .../meson/clock-gettime/meson.build | 15 ----- pdns/dnsdistdist/meson/code-coverage | 1 + .../meson/code-coverage/meson.build | 13 ---- pdns/dnsdistdist/meson/config | 1 + pdns/dnsdistdist/meson/config/meson.build | 1 - pdns/dnsdistdist/meson/dlopen | 1 + pdns/dnsdistdist/meson/dlopen/meson.build | 15 ----- pdns/dnsdistdist/meson/dnstap | 1 + pdns/dnsdistdist/meson/dnstap/meson.build | 17 ----- pdns/dnsdistdist/meson/dot | 1 + pdns/dnsdistdist/meson/dot/meson.build | 8 --- pdns/dnsdistdist/meson/gnutls | 1 + pdns/dnsdistdist/meson/gnutls/meson.build | 19 ------ pdns/dnsdistdist/meson/hardening | 1 + .../meson/hardening/control-flow/meson.build | 10 --- .../hardening/fortify-source/meson.build | 37 ----------- pdns/dnsdistdist/meson/hardening/meson.build | 34 ---------- .../meson/hardening/relro/meson.build | 16 ----- .../hardening/stack-clash-prot/meson.build | 10 --- .../meson/hardening/stack-prot/meson.build | 8 --- .../hardening/stack-smashing-prot/meson.build | 10 --- pdns/dnsdistdist/meson/ipcipher | 1 + pdns/dnsdistdist/meson/ipcipher/meson.build | 9 --- pdns/dnsdistdist/meson/kiss-rng | 1 + pdns/dnsdistdist/meson/kiss-rng/meson.build | 3 - pdns/dnsdistdist/meson/libdir | 1 + pdns/dnsdistdist/meson/libdir/meson.build | 1 - pdns/dnsdistdist/meson/libssl | 1 + pdns/dnsdistdist/meson/libssl/meson.build | 42 ------------ pdns/dnsdistdist/meson/libsystemd | 1 + pdns/dnsdistdist/meson/libsystemd/meson.build | 9 --- pdns/dnsdistdist/meson/mmap | 1 + pdns/dnsdistdist/meson/mmap/meson.build | 7 -- pdns/dnsdistdist/meson/net-libs | 1 + pdns/dnsdistdist/meson/net-libs/meson.build | 44 ------------- pdns/dnsdistdist/meson/platform | 1 + pdns/dnsdistdist/meson/platform/meson.build | 64 ------------------- pdns/dnsdistdist/meson/pthread-headers | 1 + .../meson/pthread-headers/meson.build | 18 ------ pdns/dnsdistdist/meson/pthread-np | 1 + pdns/dnsdistdist/meson/pthread-np/meson.build | 13 ---- pdns/dnsdistdist/meson/pthread-setname | 1 + .../meson/pthread-setname/meson.build | 57 ----------------- .../pthread_set_name_np_2args.cc | 9 --- .../pthread_set_name_np_void_2args.cc | 10 --- .../pthread_setname_np_1arg.cc | 9 --- .../pthread_setname_np_2args.cc | 10 --- .../pthread_setname_np_3args.cc | 9 --- pdns/dnsdistdist/meson/reproducible | 1 + .../meson/reproducible/meson.build | 48 -------------- pdns/dnsdistdist/meson/sanitizers | 1 + .../meson.build | 44 ------------- .../sanitizer_finish_switch_fiber_1ptr.cc | 7 -- .../sanitizer_finish_switch_fiber_3ptrs.cc | 7 -- pdns/dnsdistdist/meson/sanitizers/meson.build | 11 ---- pdns/dnsdistdist/meson/strerror | 1 + pdns/dnsdistdist/meson/strerror/meson.build | 13 ---- pdns/dnsdistdist/meson/strerror/strerror_r.c | 8 --- pdns/dnsdistdist/meson/summary | 1 + pdns/dnsdistdist/meson/summary/meson.build | 5 -- pdns/dnsdistdist/meson/sysconfdir | 1 + pdns/dnsdistdist/meson/sysconfdir/meson.build | 1 - pdns/dnsdistdist/meson/systemd | 1 + pdns/dnsdistdist/meson/systemd/meson.build | 50 --------------- pdns/dnsdistdist/meson/timet-sign | 1 + pdns/dnsdistdist/meson/timet-sign/meson.build | 10 --- .../meson/timet-sign/timet_sign.cc | 8 --- pdns/dnsdistdist/meson/timet-size | 1 + pdns/dnsdistdist/meson/timet-size/meson.build | 9 --- pdns/dnsdistdist/meson/tm-gmtoff | 1 + pdns/dnsdistdist/meson/tm-gmtoff/meson.build | 8 --- pdns/dnsdistdist/meson/various-functions | 1 + .../meson/various-functions/meson.build | 22 ------- pdns/dnsdistdist/meson/various-headers | 1 + .../meson/various-headers/meson.build | 5 -- pdns/dnsdistdist/meson/version | 1 + pdns/dnsdistdist/meson/version/meson.build | 4 -- 85 files changed, 34 insertions(+), 835 deletions(-) create mode 120000 pdns/dnsdistdist/meson/atomics delete mode 100644 pdns/dnsdistdist/meson/atomics/atomic_add_fetch.cc delete mode 100644 pdns/dnsdistdist/meson/atomics/meson.build create mode 120000 pdns/dnsdistdist/meson/auto-var-init delete mode 100644 pdns/dnsdistdist/meson/auto-var-init/meson.build create mode 120000 pdns/dnsdistdist/meson/boost delete mode 100644 pdns/dnsdistdist/meson/boost/meson.build create mode 120000 pdns/dnsdistdist/meson/clock-gettime delete mode 100644 pdns/dnsdistdist/meson/clock-gettime/meson.build create mode 120000 pdns/dnsdistdist/meson/code-coverage delete mode 100644 pdns/dnsdistdist/meson/code-coverage/meson.build create mode 120000 pdns/dnsdistdist/meson/config delete mode 100644 pdns/dnsdistdist/meson/config/meson.build create mode 120000 pdns/dnsdistdist/meson/dlopen delete mode 100644 pdns/dnsdistdist/meson/dlopen/meson.build create mode 120000 pdns/dnsdistdist/meson/dnstap delete mode 100644 pdns/dnsdistdist/meson/dnstap/meson.build create mode 120000 pdns/dnsdistdist/meson/dot delete mode 100644 pdns/dnsdistdist/meson/dot/meson.build create mode 120000 pdns/dnsdistdist/meson/gnutls delete mode 100644 pdns/dnsdistdist/meson/gnutls/meson.build create mode 120000 pdns/dnsdistdist/meson/hardening delete mode 100644 pdns/dnsdistdist/meson/hardening/control-flow/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/fortify-source/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/relro/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/stack-clash-prot/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/stack-prot/meson.build delete mode 100644 pdns/dnsdistdist/meson/hardening/stack-smashing-prot/meson.build create mode 120000 pdns/dnsdistdist/meson/ipcipher delete mode 100644 pdns/dnsdistdist/meson/ipcipher/meson.build create mode 120000 pdns/dnsdistdist/meson/kiss-rng delete mode 100644 pdns/dnsdistdist/meson/kiss-rng/meson.build create mode 120000 pdns/dnsdistdist/meson/libdir delete mode 100644 pdns/dnsdistdist/meson/libdir/meson.build create mode 120000 pdns/dnsdistdist/meson/libssl delete mode 100644 pdns/dnsdistdist/meson/libssl/meson.build create mode 120000 pdns/dnsdistdist/meson/libsystemd delete mode 100644 pdns/dnsdistdist/meson/libsystemd/meson.build create mode 120000 pdns/dnsdistdist/meson/mmap delete mode 100644 pdns/dnsdistdist/meson/mmap/meson.build create mode 120000 pdns/dnsdistdist/meson/net-libs delete mode 100644 pdns/dnsdistdist/meson/net-libs/meson.build create mode 120000 pdns/dnsdistdist/meson/platform delete mode 100644 pdns/dnsdistdist/meson/platform/meson.build create mode 120000 pdns/dnsdistdist/meson/pthread-headers delete mode 100644 pdns/dnsdistdist/meson/pthread-headers/meson.build create mode 120000 pdns/dnsdistdist/meson/pthread-np delete mode 100644 pdns/dnsdistdist/meson/pthread-np/meson.build create mode 120000 pdns/dnsdistdist/meson/pthread-setname delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/meson.build delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_2args.cc delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_void_2args.cc delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_1arg.cc delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_2args.cc delete mode 100644 pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_3args.cc create mode 120000 pdns/dnsdistdist/meson/reproducible delete mode 100644 pdns/dnsdistdist/meson/reproducible/meson.build create mode 120000 pdns/dnsdistdist/meson/sanitizers delete mode 100644 pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/meson.build delete mode 100644 pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_1ptr.cc delete mode 100644 pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_3ptrs.cc delete mode 100644 pdns/dnsdistdist/meson/sanitizers/meson.build create mode 120000 pdns/dnsdistdist/meson/strerror delete mode 100644 pdns/dnsdistdist/meson/strerror/meson.build delete mode 100644 pdns/dnsdistdist/meson/strerror/strerror_r.c create mode 120000 pdns/dnsdistdist/meson/summary delete mode 100644 pdns/dnsdistdist/meson/summary/meson.build create mode 120000 pdns/dnsdistdist/meson/sysconfdir delete mode 100644 pdns/dnsdistdist/meson/sysconfdir/meson.build create mode 120000 pdns/dnsdistdist/meson/systemd delete mode 100644 pdns/dnsdistdist/meson/systemd/meson.build create mode 120000 pdns/dnsdistdist/meson/timet-sign delete mode 100644 pdns/dnsdistdist/meson/timet-sign/meson.build delete mode 100644 pdns/dnsdistdist/meson/timet-sign/timet_sign.cc create mode 120000 pdns/dnsdistdist/meson/timet-size delete mode 100644 pdns/dnsdistdist/meson/timet-size/meson.build create mode 120000 pdns/dnsdistdist/meson/tm-gmtoff delete mode 100644 pdns/dnsdistdist/meson/tm-gmtoff/meson.build create mode 120000 pdns/dnsdistdist/meson/various-functions delete mode 100644 pdns/dnsdistdist/meson/various-functions/meson.build create mode 120000 pdns/dnsdistdist/meson/various-headers delete mode 100644 pdns/dnsdistdist/meson/various-headers/meson.build create mode 120000 pdns/dnsdistdist/meson/version delete mode 100644 pdns/dnsdistdist/meson/version/meson.build diff --git a/pdns/dnsdistdist/meson/atomics b/pdns/dnsdistdist/meson/atomics new file mode 120000 index 0000000000..f66584baf5 --- /dev/null +++ b/pdns/dnsdistdist/meson/atomics @@ -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 index 0f560d3e18..0000000000 --- a/pdns/dnsdistdist/meson/atomics/atomic_add_fetch.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include - -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 index 47bf92ef88..0000000000 --- a/pdns/dnsdistdist/meson/atomics/meson.build +++ /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 index 0000000000..4dd250152f --- /dev/null +++ b/pdns/dnsdistdist/meson/auto-var-init @@ -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 index 56c3ade41f..0000000000 --- a/pdns/dnsdistdist/meson/auto-var-init/meson.build +++ /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 index 0000000000..35cc45495b --- /dev/null +++ b/pdns/dnsdistdist/meson/boost @@ -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 index 76e97576bb..0000000000 --- a/pdns/dnsdistdist/meson/boost/meson.build +++ /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 index 0000000000..a88e7f3e9b --- /dev/null +++ b/pdns/dnsdistdist/meson/clock-gettime @@ -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 index b1249a0e22..0000000000 --- a/pdns/dnsdistdist/meson/clock-gettime/meson.build +++ /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 index 0000000000..dc72803d46 --- /dev/null +++ b/pdns/dnsdistdist/meson/code-coverage @@ -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 index 603dfc4341..0000000000 --- a/pdns/dnsdistdist/meson/code-coverage/meson.build +++ /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 index 0000000000..97b0070df2 --- /dev/null +++ b/pdns/dnsdistdist/meson/config @@ -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 index 09c7034829..0000000000 --- a/pdns/dnsdistdist/meson/config/meson.build +++ /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 index 0000000000..0b2f1067f0 --- /dev/null +++ b/pdns/dnsdistdist/meson/dlopen @@ -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 index fdc7e0d067..0000000000 --- a/pdns/dnsdistdist/meson/dlopen/meson.build +++ /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 index 0000000000..46d9991cef --- /dev/null +++ b/pdns/dnsdistdist/meson/dnstap @@ -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 index e7a487ef51..0000000000 --- a/pdns/dnsdistdist/meson/dnstap/meson.build +++ /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 index 0000000000..125641e9b6 --- /dev/null +++ b/pdns/dnsdistdist/meson/dot @@ -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 index e1166a1814..0000000000 --- a/pdns/dnsdistdist/meson/dot/meson.build +++ /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 index 0000000000..896dade75d --- /dev/null +++ b/pdns/dnsdistdist/meson/gnutls @@ -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 index 8e1a2294a3..0000000000 --- a/pdns/dnsdistdist/meson/gnutls/meson.build +++ /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 index 0000000000..d1b676de85 --- /dev/null +++ b/pdns/dnsdistdist/meson/hardening @@ -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 index 0c1ed36722..0000000000 --- a/pdns/dnsdistdist/meson/hardening/control-flow/meson.build +++ /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 index 2ef4ea9c98..0000000000 --- a/pdns/dnsdistdist/meson/hardening/fortify-source/meson.build +++ /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 index 1859c63baf..0000000000 --- a/pdns/dnsdistdist/meson/hardening/meson.build +++ /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 index 23e57a6ade..0000000000 --- a/pdns/dnsdistdist/meson/hardening/relro/meson.build +++ /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 index cce9ae1444..0000000000 --- a/pdns/dnsdistdist/meson/hardening/stack-clash-prot/meson.build +++ /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 index 43d8253afb..0000000000 --- a/pdns/dnsdistdist/meson/hardening/stack-prot/meson.build +++ /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 index fb24faa8e2..0000000000 --- a/pdns/dnsdistdist/meson/hardening/stack-smashing-prot/meson.build +++ /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 index 0000000000..ecd1d70458 --- /dev/null +++ b/pdns/dnsdistdist/meson/ipcipher @@ -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 index 0d67db531a..0000000000 --- a/pdns/dnsdistdist/meson/ipcipher/meson.build +++ /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 index 0000000000..268370c5fa --- /dev/null +++ b/pdns/dnsdistdist/meson/kiss-rng @@ -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 index d11cdad9a6..0000000000 --- a/pdns/dnsdistdist/meson/kiss-rng/meson.build +++ /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 index 0000000000..9edafc7f6e --- /dev/null +++ b/pdns/dnsdistdist/meson/libdir @@ -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 index 7e370c4510..0000000000 --- a/pdns/dnsdistdist/meson/libdir/meson.build +++ /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 index 0000000000..c594bbd414 --- /dev/null +++ b/pdns/dnsdistdist/meson/libssl @@ -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 index 387d5514f6..0000000000 --- a/pdns/dnsdistdist/meson/libssl/meson.build +++ /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 index 0000000000..a2be793ee7 --- /dev/null +++ b/pdns/dnsdistdist/meson/libsystemd @@ -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 index a4649a4ff1..0000000000 --- a/pdns/dnsdistdist/meson/libsystemd/meson.build +++ /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 index 0000000000..e8c0d478df --- /dev/null +++ b/pdns/dnsdistdist/meson/mmap @@ -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 index 69eae7ce71..0000000000 --- a/pdns/dnsdistdist/meson/mmap/meson.build +++ /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 ''') - -conf.set('HAVE_MMAP', have_mmap, description: 'Have mmap') - -summary('Have ', 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 index 0000000000..537e40d4c6 --- /dev/null +++ b/pdns/dnsdistdist/meson/net-libs @@ -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 index fd494ce311..0000000000 --- a/pdns/dnsdistdist/meson/net-libs/meson.build +++ /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 index 0000000000..89e25b3c21 --- /dev/null +++ b/pdns/dnsdistdist/meson/platform @@ -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 index ea2a123bc1..0000000000 --- a/pdns/dnsdistdist/meson/platform/meson.build +++ /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 index 0000000000..509fbec999 --- /dev/null +++ b/pdns/dnsdistdist/meson/pthread-headers @@ -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 index 9b2bdc0f24..0000000000 --- a/pdns/dnsdistdist/meson/pthread-headers/meson.build +++ /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 ', -) - -conf.set('HAVE_PTHREAD_NP_H', have_pthread_np_h, description: 'Have ') - -summary('Threads', dep_threads.found(), bool_yn: true, section: 'POSIX Threads') -summary('Have ', have_pthread_h, bool_yn: true, section: 'POSIX Threads') -summary('Have ', 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 index 0000000000..268e4f6166 --- /dev/null +++ b/pdns/dnsdistdist/meson/pthread-np @@ -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 index 7dc789222d..0000000000 --- a/pdns/dnsdistdist/meson/pthread-np/meson.build +++ /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 index 0000000000..275555d5d0 --- /dev/null +++ b/pdns/dnsdistdist/meson/pthread-setname @@ -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 index 2f161d7b0c..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/meson.build +++ /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 index e0280244dc..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_2args.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include -#if HAVE_PTHREAD_NP_H -#include -#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 index 7c26bbde33..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/pthread_set_name_np_void_2args.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include -#if HAVE_PTHREAD_NP_H -#include -#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 index d82b9ac945..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_1arg.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include -#if HAVE_PTHREAD_NP_H -#include -#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 index 366e44a515..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_2args.cc +++ /dev/null @@ -1,10 +0,0 @@ -#include -#if HAVE_PTHREAD_NP_H -#include -#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 index fea912e667..0000000000 --- a/pdns/dnsdistdist/meson/pthread-setname/pthread_setname_np_3args.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include -#if HAVE_PTHREAD_NP_H -#include -#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 index 0000000000..d9edaa0907 --- /dev/null +++ b/pdns/dnsdistdist/meson/reproducible @@ -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 index 1b53312c74..0000000000 --- a/pdns/dnsdistdist/meson/reproducible/meson.build +++ /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 index 0000000000..0a784a7d50 --- /dev/null +++ b/pdns/dnsdistdist/meson/sanitizers @@ -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 index 2cd80780db..0000000000 --- a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/meson.build +++ /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 index 80f453b26f..0000000000 --- a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_1ptr.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include - -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 index 3c0ca7d950..0000000000 --- a/pdns/dnsdistdist/meson/sanitizers/address-sanitizer-fiber-switching/sanitizer_finish_switch_fiber_3ptrs.cc +++ /dev/null @@ -1,7 +0,0 @@ -#include - -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 index d708ba79fe..0000000000 --- a/pdns/dnsdistdist/meson/sanitizers/meson.build +++ /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 index 0000000000..598b9f379c --- /dev/null +++ b/pdns/dnsdistdist/meson/strerror @@ -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 index 0d10cf1d42..0000000000 --- a/pdns/dnsdistdist/meson/strerror/meson.build +++ /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 ') -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 index d6a5dce3f5..0000000000 --- a/pdns/dnsdistdist/meson/strerror/strerror_r.c +++ /dev/null @@ -1,8 +0,0 @@ -#include - -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 index 0000000000..3f61f3e4e4 --- /dev/null +++ b/pdns/dnsdistdist/meson/summary @@ -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 index 01c1960b5b..0000000000 --- a/pdns/dnsdistdist/meson/summary/meson.build +++ /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 index 0000000000..a44a2e4927 --- /dev/null +++ b/pdns/dnsdistdist/meson/sysconfdir @@ -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 index 9b313eeaeb..0000000000 --- a/pdns/dnsdistdist/meson/sysconfdir/meson.build +++ /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 index 0000000000..11db1eb97e --- /dev/null +++ b/pdns/dnsdistdist/meson/systemd @@ -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 index 3cb0113144..0000000000 --- a/pdns/dnsdistdist/meson/systemd/meson.build +++ /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 index 0000000000..c0fb86f729 --- /dev/null +++ b/pdns/dnsdistdist/meson/timet-sign @@ -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 index d6670485a3..0000000000 --- a/pdns/dnsdistdist/meson/timet-sign/meson.build +++ /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 index 3df0895478..0000000000 --- a/pdns/dnsdistdist/meson/timet-sign/timet_sign.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include - -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 index 0000000000..c4662a4568 --- /dev/null +++ b/pdns/dnsdistdist/meson/timet-size @@ -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 index 5f0c060a35..0000000000 --- a/pdns/dnsdistdist/meson/timet-size/meson.build +++ /dev/null @@ -1,9 +0,0 @@ -timet_size = cxx.sizeof('time_t', prefix: '#include ') - -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 index 0000000000..e0b0dbcf6c --- /dev/null +++ b/pdns/dnsdistdist/meson/tm-gmtoff @@ -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 index e583aa0b47..0000000000 --- a/pdns/dnsdistdist/meson/tm-gmtoff/meson.build +++ /dev/null @@ -1,8 +0,0 @@ -prefix = ''' -#include -#include -''' - -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 index 0000000000..9c14861d7b --- /dev/null +++ b/pdns/dnsdistdist/meson/various-functions @@ -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 index 8c268d5720..0000000000 --- a/pdns/dnsdistdist/meson/various-functions/meson.build +++ /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 index 0000000000..3ab83415d6 --- /dev/null +++ b/pdns/dnsdistdist/meson/various-headers @@ -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 index 569c7f0bc9..0000000000 --- a/pdns/dnsdistdist/meson/various-headers/meson.build +++ /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 index 0000000000..39c9fdfdd1 --- /dev/null +++ b/pdns/dnsdistdist/meson/version @@ -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 index 5fdf56938b..0000000000 --- a/pdns/dnsdistdist/meson/version/meson.build +++ /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') -- 2.47.2