summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-05 08:29:59 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-05 08:29:59 +0200
commit2c94470dd1c15357acf261c3d7126a9a247d51c6 (patch)
tree9d33ce1c11b8bb9547f2ef7a0bf67ed67fad1824 /platform
parent75616d60e46d8478cb6c90fe1bc2ac3121de013a (diff)
parent8e04bffbcfd5dc846e15c5e6471f96693ee698fe (diff)
Merge pull request #63983 from Calinou/scons-linux-execinfo-musl
Automatically use execinfo for crash handler on *BSD and musl-based Linux
Diffstat (limited to 'platform')
-rw-r--r--platform/linuxbsd/detect.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py
index dfde0d249c..86ae1f2d9c 100644
--- a/platform/linuxbsd/detect.py
+++ b/platform/linuxbsd/detect.py
@@ -363,8 +363,10 @@ def configure(env: "Environment"):
if platform.system() == "Linux":
env.Append(LIBS=["dl"])
- if platform.system().find("BSD") >= 0:
- env["execinfo"] = True
+ if not env["execinfo"] and platform.libc_ver()[0] != "glibc":
+ # The default crash handler depends on glibc, so if the host uses
+ # a different libc (BSD libc, musl), fall back to libexecinfo.
+ print("Note: Using `execinfo=yes` for the crash handler as required on platforms where glibc is missing.")
if env["execinfo"]:
env.Append(LIBS=["execinfo"])