From eced50db84c21598ecde60e32813d6a4b911209d Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sat, 18 Apr 2026 02:27:20 +0200 Subject: [PATCH] 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 528ceeb49b95b0797979c85b959fa543253fa0b3) Part-of: --- .pick_status.json | 2 +- src/gallium/targets/rusticl/meson.build | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index a0d05ef4b82..b3a641a76dd 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/targets/rusticl/meson.build b/src/gallium/targets/rusticl/meson.build index 2b214adbbf5..d4a24fd8585 100644 --- a/src/gallium/targets/rusticl/meson.build +++ b/src/gallium/targets/rusticl/meson.build @@ -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),