diff options
| author | Rémi Verschelde | 2018-02-16 18:24:46 +0100 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-19 22:33:29 +0100 |
| commit | 8372a404bbb78fb56a9c6c671fcbeef5f90b53e6 (patch) | |
| tree | dcd337dd211fc8e6610bf98efa2c2e7ba4639d30 | |
| parent | 5b04dcfabdcdd2525ef530d9bca14ab8f1b4e69d (diff) | |
| download | godot-8372a404bbb78fb56a9c6c671fcbeef5f90b53e6.tar.gz godot-8372a404bbb78fb56a9c6c671fcbeef5f90b53e6.tar.zst godot-8372a404bbb78fb56a9c6c671fcbeef5f90b53e6.zip | |
X11: Link libgcc statically with use_static_cpp option
We were already linking libstdc++ statically for official binaries,
protecting us against most portability issues. But apparently since
we started using GCC 7 for official builds, we also need to link
libgcc statically for at least 32-bit builds to be portable.
Fixes #16409.
(cherry picked from commit b526088ae217de959cd395f5a74baf87552e0bbf)
| -rw-r--r-- | platform/x11/detect.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 02bd7232c..5b8944cd9 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -49,7 +49,7 @@ def get_opts(): return [ BoolVariable('use_llvm', 'Use the LLVM compiler', False), - BoolVariable('use_static_cpp', 'Link stdc++ statically', False), + BoolVariable('use_static_cpp', 'Link libgcc and libstdc++ statically for better portability', False), BoolVariable('use_sanitizer', 'Use LLVM compiler address sanitizer', False), BoolVariable('use_leak_sanitizer', 'Use LLVM compiler memory leaks sanitizer (implies use_sanitizer)', False), BoolVariable('pulseaudio', 'Detect & use pulseaudio', True), @@ -275,6 +275,6 @@ def configure(env): env.Append(CPPFLAGS=['-m64']) env.Append(LINKFLAGS=['-m64', '-L/usr/lib/i686-linux-gnu']) - + # Link those statically for portability if env['use_static_cpp']: - env.Append(LINKFLAGS=['-static-libstdc++']) + env.Append(LINKFLAGS=['-static-libgcc', '-static-libstdc++']) |
