This won’t workaround gcc bug.
This is fixed in gcc more than a year ago I think (after fix taking about another year to get in). Also, declspec_hotpatch is really needed for much less amount of functions since Wine modules are built as no-PIC. So probably removing the attribute on the occasion is the best course of action. Just in decade or two the compiler fix will be in all the distributions.
On 3 Jun 2023, at 8:16, Jinoh Kang (@iamahuman) wine@gitlab.winehq.org wrote:
On Sat Jun 3 08:42:04 2023 +0000, Zhiyi Zhang wrote:
The following bugs are related to the DECLSPEC_HOTPATCH. The bug gets triggered for small functions. https://bugs.winehq.org/show_bug.cgi?id=47633 https://bugs.winehq.org/show_bug.cgi?id=47649 https://source.winehq.org/git/wine.git/commitdiff/de6554a312a731db7d85440ce4... The corresponding mingw bug is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91489. Supposedly it should be fixed in the new versions.
In that case, shouldn't we just change `DECLSPEC_HOTPATCH` to never omit the frame pointer?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2960#note_34557