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>
This commit is contained in:
Karol Herbst 2026-04-18 02:27:20 +02:00 committed by Marge Bot
parent 5512680581
commit 528ceeb49b
2 changed files with 7 additions and 0 deletions

View file

@ -7,3 +7,4 @@ protectedMemory support on RADV/GFX10+ and VEGA10
VK_KHR_performance_query on RADV/GFX11
VK_EXT_conservative_rasterization on panvk
shaderImageGatherExtended on pvr
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),