summaryrefslogtreecommitdiffstats
path: root/platform/x11/detect.py
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2020-01-16 17:47:37 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2020-01-16 17:47:37 +0100
commit4eeae592935920370c75b83dff1883dbd980f20e (patch)
treec9e8bcb1634e6b91546e8e798a12423fb2931643 /platform/x11/detect.py
parent84b5ac8640d4e22627e5c7f27abcc19fadbf1724 (diff)
downloadredot-engine-4eeae592935920370c75b83dff1883dbd980f20e.tar.gz
Fix error exporting to X11 with embedded PCK
Fixes #32513.
Diffstat (limited to 'platform/x11/detect.py')
-rw-r--r--platform/x11/detect.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index b8ff97279d..5c7be34730 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -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