rusticl: link the C++ runtime statically

Apparently some applications don't have their C++ situation under control.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/14090
(cherry picked from commit 528ceeb49b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41540>
This commit is contained in:
Karol Herbst 2026-04-18 02:27:20 +02:00 committed by Eric Engestrom
parent 25f79379f5
commit eced50db84
2 changed files with 7 additions and 1 deletions

View file

@ -6474,7 +6474,7 @@
"description": "rusticl: link the C++ runtime statically",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -52,6 +52,12 @@ librusticl = shared_library(
ld_args_gc_sections,
ld_args_bsymbolic,
rusticl_ld_args,
# Seems like some proprietary apps ship libraries exporting C++ STL symbols.
# So let's just link statically against the standard C++ library then in order to prevent data
# layout mismatches and the likes.
cc.get_supported_link_arguments(
'-static-libstdc++',
),
],
link_depends : rusticl_ld_depends,
version : '@0@.0.0'.format(opencl_version),