Skip to content

Conversation

@mstorsjo
Copy link
Member

This reverts parts of commit 885d7b7, and adds verbose comments explaining all the variants of this function, for clarity for future readers.

It turns out that those functions actually weren't misnamed or unused after all: Apparently Clang doesn't match GCC when it comes to what stack probe function is referenced on i386 mingw. GCC < 4.6 references a symbol named "___chkstk", with three leading underscores, and GCC >= 4.6 references "___chkstk_ms".

Restore these functions, to allow linking object files built with GCC with compiler-rt.

@mstorsjo
Copy link
Member Author

See the two individual commits for more clarify on the two steps involved here. If accepted, I would merge this one by manually pushing both commits, instead of having to do a separate PR for just the file rename revert. (When viewing the final diff over both commits, it is more unclear what is going on, when one file is renamed and another one is added with the original name.)

Copy link
Contributor

@cjacek cjacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…tk.S"

This reverts commit 1f9eff1.

This is done in preparation of reverting parts of
885d7b7.
…nctions"

This reverts parts of commit 885d7b7,
and adds verbose comments explaining all the variants of this
function, for clarity for future readers.

It turns out that those functions actually weren't misnamed or
unused after all: Apparently Clang doesn't match GCC when it comes
to what stack probe function is referenced on i386 mingw. GCC < 4.6
references a symbol named "___chkstk", with three leading underscores,
and GCC >= 4.6 references "___chkstk_ms".

Restore these functions, to allow linking object files built with
GCC with compiler-rt.
@mstorsjo mstorsjo merged commit 825706b into llvm:main Nov 13, 2025
7 of 10 checks passed
@mstorsjo mstorsjo deleted the restore-gcc-chkstk branch November 13, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants