[Linux] Only export extension init symbol

Since we link with static libstdc++ we need to tell gcc to only export
the necessary symbols.
Using "-fvisibility=hidden" will not work, since libstdc++ explicitly
exports its symbols.
This commit is contained in:
Fabio Alessandrelli
2023-12-21 19:05:53 +01:00
parent ec0ededcde
commit b0efc17d3b
5 changed files with 40 additions and 12 deletions

View File

@@ -125,6 +125,8 @@ def build_openssl(env, jobs=None):
env.Prepend(LIBPATH=[env["SSL_BUILD"]])
if env["platform"] == "windows":
env.PrependUnique(LIBS=["crypt32", "ws2_32", "advapi32", "user32"])
if env["platform"] == "linux":
env.PrependUnique(LIBS=["pthread", "dl"])
env.Prepend(LIBS=env["SSL_LIBS"])
return [env["SSL_CRYPTO_LIBRARY"], env["SSL_LIBRARY"]]
@@ -169,6 +171,8 @@ def build_openssl(env, jobs=None):
env.Prepend(LIBPATH=[env["SSL_BUILD"]])
if env["platform"] == "windows":
env.PrependUnique(LIBS=["crypt32", "ws2_32", "advapi32", "user32"])
if env["platform"] == "linux":
env.PrependUnique(LIBS=["pthread", "dl"])
env.Prepend(LIBS=env["SSL_LIBS"])
return ssl