On 2026-10-23 14:45, Evgeny Karpov wrote:
The patch below introduces a regression for x86_64-w64-mingw32 target.
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/4b51967147bf72562de95078c84385bf7fa3ceb3/

ld: x86_64-w64-mingw32/lib/libmingwex.a(lib64_libmingwex_a-fesetenv.o):fesetenv.c:(.rdata$.refptr.__mingw_fe_dfl_env[.refptr.__mingw_fe_dfl_env]+0x0): undefined reference to `__mingw_fe_dfl_env'

Regards,
Evgeny

Thanks for reporting.  I can reproduce this when linking a dll.

I think it's because

An EXE always pulls in CRT_fp10.o through the _fpreset call in crtexe.c,
but a DLL does not.  When fesetenv.o is first pulled in by a library
that comes after the last libmingw32.a on the command line, such as
libpthread.a (pthread_create calls fesetenv), linking the DLL with GNU
ld fails:
  undefined reference to `__mingw_fe_dfl_env'

I think the solution is to move CRT_fpn.o over into libmingwex.a
I will post a patch for that shortly.


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

Reply via email to