Skip to content

Commit 37ecf63

Browse files
authored
Merge pull request #19 from godotengine/linux32-use-gcc4.8
Linux: Use GCC 4.8 for 32-bit x86
2 parents 02510df + 0a5547b commit 37ecf63

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

build-linux/build.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ export SCONS="scons -j${NUM_CORES} verbose=yes warnings=no progress=no"
99
export OPTIONS="debug_symbols=no use_lto=yes"
1010
export OPTIONS_MONO="module_mono_enabled=yes mono_static=yes"
1111
export TERM=xterm
12-
export CC="gcc-9"
13-
export CXX="g++-9"
1412

13+
# i386 doesn't play nice with -static-libstdc++, so we should link dynamically
14+
# against an old enough GCC for compatibility with newer distros - so we only
15+
# use a recent GCC for x86_64. See godotengine/godot#31743.
16+
# Without defining CC/CXX, we use the default GCC 4.8.
1517
if [ "$(getconf LONG_BIT)" == "64" ]; then
16-
export OPTIONS="${OPTIONS} use_static_cpp=yes"
18+
export CC="gcc-9"
19+
export CXX="g++-9"
20+
else
21+
export OPTIONS="$OPTIONS use_static_cpp=no"
22+
export CC="gcc"
23+
export CXX="g++"
1724
fi
1825

1926
rm -rf godot

0 commit comments

Comments
 (0)