GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
mingw

MinGW targets now support -mpc32, -mpc64, and -mpc80 options.

MinGW targets now correctly link floating-point precision control libraries for -mpc32, -mpc64, and -mpc80 options.

The -mpc32, -mpc64, and -mpc80 options, which control x87 floating-point precision, are now functional on MinGW targets. Previously, these options were accepted but had no effect as the necessary control libraries were not linked. This change ensures that the appropriate CRT_fp*.o objects are linked, setting the x87 precision at link time. The behavior of these options in DLLs and new threads is also documented.

In Details

This commit enables the -mpc{32,64,80} options for MinGW targets by modifying STARTFILE_SPEC in i386/mingw-w64.h. It ensures that the correct floating-point precision control objects (CRT_fp4.o, CRT_fp8.o, or CRT_fp10.o) are linked early in the startup sequence, before libmingw32.a. This aligns MinGW behavior with other x86 targets and addresses the lack of automatic precision setting in MinGW-w64's runtime.

For Context
x87 precision control
Refers to the hardware control bits in x87 floating-point units that determine the precision (number of bits) used for calculations. Options like -mpc32, -mpc64, and -mpc80 allow developers to select specific precision levels.
CRT_fp*.o
C Runtime (CRT) initialization objects that set the x87 floating-point precision. Different files (e.g., CRT_fp4.o for 24-bit, CRT_fp8.o for 53-bit, CRT_fp10.o for 64-bit) are linked based on the desired precision.
STARTFILE_SPEC
A GCC internal configuration macro that specifies the order and names of startup files to be linked by the linker. Modifying this affects which runtime initialization code is included.
MinGW
Minimalist GNU for Windows, a development environment that provides a Windows port of the GNU Compiler Collection (GCC) and the GNU Binutils. It allows developers to create native Windows applications.
Filed Under: mingwx87floating-point