Compare commits

..

No commits in common. "factory" and "devel" have entirely different histories.

3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:da14e36448f1efd2955fe85d7ededc9e6ac8c893f76723b4852e7587306c761d
size 26768552

View File

@ -0,0 +1 @@
da14e36448f1efd2955fe85d7ededc9e6ac8c893f76723b4852e7587306c761d godot-4.2.2-stable.tar.xz

View File

@ -0,0 +1,37 @@
From: cunix@mail.de
Date: 2023-09-21 12:00:00
Subject: regex in linker detection for template builds fails sometimes to recognize correct ld version
References: https://github.com/godotengine/godot/issues/82078
Rebased: 2023-11-30
distro added stuff to "ld --version" output prevents correct
version detection.
regex adjusted to improve detection of linker to include
pck embedding code in template builds.
dstoecker helped to improve the changed regex and gave hints for the implied
dangers regarding assumptions about the parsed string
---
diff -r -U 5 a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -463,16 +463,17 @@
import re
linker_version_str = subprocess.check_output(
[env.subst(env["LINK"]), "-Wl,--version"] + env.subst(env["LINKFLAGS"])
).decode("utf-8")
- gnu_ld_version = re.search(r"^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
+ gnu_ld_version = re.search(r"^GNU ld \(GNU Binutils[^)]*\) (\d+\.\d+)", linker_version_str, re.MULTILINE)
if not gnu_ld_version:
print(
"Warning: Creating export template binaries enabled for PCK embedding is currently only supported with GNU ld, not gold, LLD or mold."
)
else:
+ print("gnu_ld_version found by patch: " + str(gnu_ld_version.group(1)))
if float(gnu_ld_version.group(1)) >= 2.30:
env.Append(LINKFLAGS=["-T", "platform/linuxbsd/pck_embed.ld"])
else:
env.Append(LINKFLAGS=["-T", "platform/linuxbsd/pck_embed.legacy.ld"])