1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Merge pull request #35209 from RandomShaper/fix_pck_embed_linux

Fix error exporting to X11 with embedded PCK
This commit is contained in:
Rémi Verschelde
2020-01-16 18:45:20 +01:00
committed by GitHub
3 changed files with 21 additions and 5 deletions

View File

@@ -171,7 +171,7 @@ def configure(env):
else:
env.Append(CCFLAGS=['-flto'])
env.Append(LINKFLAGS=['-flto'])
if not env['use_llvm']:
env['RANLIB'] = 'gcc-ranlib'
env['AR'] = 'gcc-ar'
@@ -329,9 +329,15 @@ def configure(env):
if env["execinfo"]:
env.Append(LIBS=['execinfo'])
if not env['tools']:
env.Append(LINKFLAGS=['-T', 'platform/x11/pck_embed.ld'])
import subprocess
import re
binutils_version = re.search('\s(\d+\.\d+)', str(subprocess.check_output(['ld', '-v']))).group(1)
if float(binutils_version) >= 2.30:
env.Append(LINKFLAGS=['-T', 'platform/x11/pck_embed.ld'])
else:
env.Append(LINKFLAGS=['-T', 'platform/x11/pck_embed.legacy.ld'])
## Cross-compilation