mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 02:43:29 +00:00
[Linux] Add support for PCK embedding section with non GNU-ld linkers.
This commit is contained in:
parent
0bcc0e92b3
commit
625c4bdace
5 changed files with 14 additions and 40 deletions
|
|
@ -458,24 +458,6 @@ def configure(env: "Environment"):
|
|||
if env["execinfo"]:
|
||||
env.Append(LIBS=["execinfo"])
|
||||
|
||||
if not env.editor_build:
|
||||
import subprocess
|
||||
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)
|
||||
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:
|
||||
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"])
|
||||
|
||||
if platform.system() == "FreeBSD":
|
||||
env.Append(LINKFLAGS=["-lkvm"])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue