GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
aarch64

aarch64: mingw: Enable init priority order.

Enables init priority order for aarch64-w64-mingw32, which is required for winpthreads and allows building from upstream repos.

This commit enables initialization priority order support for the aarch64-w64-mingw32 target. This support is necessary for winpthreads to function correctly and allows building the aarch64-w64-mingw32 toolchain directly from the upstream Binutils, GCC, and MinGW repositories.

In Details

This commit enables SUPPORTS_INIT_PRIORITY in config/aarch64/aarch64-coff.h for the aarch64-w64-mingw32 target. This enables support for constructor priority attributes, which are used by libraries like winpthreads. This is a configuration change with limited scope, but it unlocks full toolchain builds.

For Context

When a program starts, global variables and objects need to be initialized in a specific order. The "init priority" feature allows developers to control this order. This commit enables init priority support for the AArch64 architecture when compiling for Windows using the MinGW environment (aarch64-w64-mingw32). This change is necessary for certain libraries, like winpthreads (Windows pthreads), to work correctly, and it also allows building the entire toolchain from source.

Filed Under: aarch64mingwinitializationwinpthreads