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'))