]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec and dnsdist: fix symbol export on macOS 15307/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 14 Mar 2025 11:13:49 +0000 (12:13 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 14 Mar 2025 11:55:23 +0000 (12:55 +0100)
pdns/dnsdistdist/meson/lua/meson.build
pdns/recursordist/meson.build

index 3f5a299dc1747d3702d118e79f81622b85964b77..62aafc046b8aec8fd7d6cd863186e63a69ae8a62 100644 (file)
@@ -42,8 +42,12 @@ conf.set('HAVE_LUA', dep_lua.found(), description: 'Lua')
 conf.set('HAVE_LUA_HPP', have_luahpp, description: 'Have <lua.hpp>')
 
 if dep_lua.found() and dep_lua.name() == 'luajit'
-  # export FFI interfaces symbols, to be able to use the Lua FFI interface
-  add_project_link_arguments('-Wl,--export-dynamic-symbol=dnsdist_ffi_*', language: ['c', 'cpp'])
+  if target_machine.system() != 'darwin'
+    # export FFI interfaces symbols, to be able to use the Lua FFI interface
+    add_project_link_arguments('-Wl,--export-dynamic-symbol=dnsdist_ffi_*', language: ['c', 'cpp'])
+  else
+    add_project_link_arguments('-rdynamic', language: ['c', 'cpp'])
+  endif
 endif
 
 summary('Lua', dep_lua.found(), bool_yn: true, section: 'Lua')
index 75ca0664f1c3b828d7580c747eb5e249eed3930a..f32b4aa0a75416a0f0e1b0d46cce6f539f6760b5 100644 (file)
@@ -19,10 +19,6 @@ meson.add_dist_script('version.sh', 'set-dist', meson.project_version())
 
 add_project_arguments('-DRECURSOR', language: 'cpp')
 add_project_arguments(
-  '-Wshadow',
-  '-Wmissing-declarations',
-  '-Wredundant-decls',
-  '-Wno-ignored-attributes',
   '-fvisibility=hidden',
   language: ['c', 'cpp'],
 )
@@ -413,13 +409,20 @@ librec_common = declare_dependency(
   )
 )
 
+
+if target_machine.system() != 'darwin'
+    rec_link_args = [
+       '-Wl,--export-dynamic-symbol=pdns_ffi_*',
+       '-Wl,--export-dynamic-symbol=pdns_postresolve_ffi_*',
+    ]
+else
+    rec_link_args = ['-rdynamic']
+endif
+
 tools = {
   'pdns_recursor': {
     'main': src_dir / 'rec-main.cc',
-    'link-args': [
-       '-Wl,--export-dynamic-symbol=pdns_ffi_*',
-       '-Wl,--export-dynamic-symbol=pdns_postresolve_ffi_*',
-    ],
+    'link-args': rec_link_args,
     'files-extra': [
       src_dir / 'capabilities.cc',
       src_dir / 'channel.cc',