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
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41037>
(cherry picked from commit 528ceeb49b)
This commit is contained in:
Karol Herbst 2026-04-18 02:27:20 +02:00 committed by Eric Engestrom
parent a54fd2b2aa
commit ab486e0b09
3 changed files with 8 additions and 1 deletions

View file

@ -3204,7 +3204,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,3 +52,4 @@ multiDrawIndirect on pvr
depthBiasClamp on pvr
wideLines on pvr
VK_EXT_rgba10x6_formats on panvk
static C++ stdlib required on rusticl to workaround applications using their own C++ stdlib

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),