From ce8e4e7f42ef371ba9c3897793543733164ce26d Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 22 Jul 2025 14:04:53 +0200 Subject: [PATCH] Handle unresolved relocations at link time --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/setup.py b/setup.py index 94b49aa..bd75553 100644 --- a/setup.py +++ b/setup.py @@ -189,8 +189,16 @@ def run(self): '-fno-strict-aliasing', '-Wno-error=declaration-after-statement', '-Werror=implicit-function-declaration', + '-fvisibility=hidden', + '-fno-common', ] ) + if sys.platform == 'linux': + ext.extra_link_args.extend( + [ + '-Wl,-Bsymbolic', + ] + ) if self.debug: ext.define_macros.append(('PYXMLSEC_ENABLE_DEBUG', '1'))