On Monday 19 October 2026 19:05:16 LIU Hao wrote:
> 在 2026-10-19 19:02, Pali Rohár 写道:
> > This copy of *FE_DFL_ENV will not work and will break mingw-w64
> > applications which are linked with CRT_fp8.o object file which changes
> > the default precision from 10-byte to 8-byte.
> > 
> > The default precision is not 10-byte, but rather defined which _fpreset
> > function is statically linked into the exe, CRT_fp8.o or CRT_fp10.o.
> > By default is linked CRT_fp10.o
> > 
> > I think that this needs more work. What about moving the
> > __mingw_fe_dfl_env definition into the CRT_fp??.c files?
> > Then the copy of *FE_DFL_ENV would work also for applications linked
> > with CRT_fp8.o which have 8-byte default precision.
> 
> I think this is fine. There has to be a default value when no CRT_fp*.o is 
> linked.

crtexe.c is already depending on the _fpreset function which is
provided by the CRT_fp*.o. And the CRT_fp10.o is part of the
libmingw32.a library which contains also other startup files.

So when no CRT_fp*.o is explicitly linked then the CRT_fp10.o is
implicitly linked (because it is needed for _fpreset).

So the default value of __mingw_fe_dfl_env can be also inside the
implicitly linked object file, which is always available via import
library.


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to