summaryrefslogtreecommitdiff
path: root/platform/server/detect.py
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-02-22 19:06:11 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-02-22 19:06:11 +0100
commitbe7bfdfac30b3772fde6058d470b81b480f03be7 (patch)
treea3c53db0bfc77ed71aed12885da5a890a6607767 /platform/server/detect.py
parent270ef3a189fb9d82d7b6c230649ada4e8c22dbdd (diff)
server: Add support for statically linking libgcc and libstdc++
Diffstat (limited to 'platform/server/detect.py')
-rw-r--r--platform/server/detect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/server/detect.py b/platform/server/detect.py
index fd4b6eae1c..43aad4ad26 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -22,6 +22,7 @@ def get_opts():
from SCons.Variables import BoolVariable
return [
BoolVariable('use_llvm', 'Use the LLVM compiler', False),
+ BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False),
]
@@ -132,3 +133,7 @@ def configure(env):
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
env.Append(LIBS=['pthread'])
env.Append(LIBS=['dl'])
+
+ # Link those statically for portability
+ if env['use_static_cpp']:
+ env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++'])