Skip to content

Add -mno-outline-atomics to CFLAGS when building mingw-w64-crt and mingw-w64-libraries/winpthreads for aarch64-*#8

Open
Blackhex wants to merge 8 commits intowoarm64from
fix-outline-atomics
Open

Add -mno-outline-atomics to CFLAGS when building mingw-w64-crt and mingw-w64-libraries/winpthreads for aarch64-*#8
Blackhex wants to merge 8 commits intowoarm64from
fix-outline-atomics

Conversation

@Blackhex
Copy link
Copy Markdown
Member

Just another option that may resolve Windows-on-ARM-Experiments/mingw-woarm64-build#208 and Windows-on-ARM-Experiments/mingw-woarm64-build#205. It depends which way will be accepted by the MinGW community.

@Blackhex Blackhex self-assigned this Mar 24, 2025
… and `mingw-w64-libraries/winpthreads` for `aarch64-*`
@Blackhex Blackhex force-pushed the fix-outline-atomics branch from 5a6dbc6 to c187702 Compare March 24, 2025 16:37
@Blackhex Blackhex changed the title Add -mno-outline-atomics to CFLAGS when building mingw-w64-crt and mingw-w64-libraries/winpthreads for aarch64-* Add -mno-outline-atomics to CFLAGS when building mingw-w64-crt and mingw-w64-libraries/winpthreads for aarch64-* Mar 24, 2025
@Andarwinux
Copy link
Copy Markdown

Why doesn't clang need this? Does this change the behavior of the clang build?

@Blackhex
Copy link
Copy Markdown
Member Author

Why doesn't clang need this? Does this change the behavior of the clang build?

It depends whether -moutline-atomics is default for Clang and where it implements them. You can also check https://godbolt.org/z/GPdjff1Yh. In case of GCC, it's enabled by default and they are implemented in libgcc.

Copy link
Copy Markdown
Member

@eukarpov eukarpov left a comment

Choose a reason for hiding this comment

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

Which work is unblocked by adding this change?

@eukarpov
Copy link
Copy Markdown
Member

Which work is unblocked by adding this change?

It looks like it is needed for this
Windows-on-ARM-Experiments/github-actions-templates#1

why that template is needed?

@Blackhex
Copy link
Copy Markdown
Member Author

Blackhex commented May 26, 2025

Which work is unblocked by adding this change?

Mainly it's needed for the fix of the build procedure of MinGW libraries https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/pull/205/files. Currently, we are not building all parts of MinGW on the CI.

Furthermore, this change is needed to build native MinGW toolchain MSYS2 packages. There, it's currently applied as a patch.

@Blackhex
Copy link
Copy Markdown
Member Author

Blackhex commented May 26, 2025

why that template is needed?

That template should serve to the MSYS2 community as documentation and proof-of-concept how to build AArch64 MinGW MSYS2 packages using public Arm64 GitHub Actions runners and is not related to this PRs' changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MinGW: libwinpthreads and crt need to be built with -mno-outline-atomics

3 participants