On Wednesday 17 September 2025 11:55:47 Martin Storsjö wrote: > On Sun, 31 Aug 2025, Pali Rohár wrote: > > > UCRT has _setjmp and _setjmpex function symbols in DLL libs prefixed by the > > __intrinsic keyword. Add symbol aliases without this prefix which allows to > > call _setjmp and _setjmpex without the prefix also for UCRT builds and so > > allows to unify header files for msvcrt vs UCRT builds. > > > > Aliases in crt-aliases.def.in are used for libucrtbase.a and libucrtbased.a > > import libraries. Aliases in api-ms-win-crt-private-l1-1-0.def.in are used > > for libucrt.a import library. And aliases in setjmp.S are used for > > libucrtapp.a import library. > > --- > > mingw-w64-crt/def-include/crt-aliases.def.in | 5 +++++ > > .../lib-common/api-ms-win-crt-private-l1-1-0.def.in | 2 ++ > > mingw-w64-crt/misc/setjmp.S | 10 ++++++++++ > > 3 files changed, 17 insertions(+) > > In general, I prefer to align the general use with what UCRT does, and add > this kind of aliases in the msvcr* libraries instead. But in this case, as > the whole field of setjmp functions is a huge mess, I agree that it might be > easiest to align the headers towards a more common base, and redirect > _setjmp to __intrinsic_setjmp in the import library instead. > > So patch ok, but noting that this isn't our usual approach. > > // Martin
Just to note that msvc compiler also produce object files with calls to _setjmp* (and not to __intrinsic_setjmp*) even for UCRT. Seems that ms linker or import libraries resolve the _setjmp* symbols from object files to DLL symbols __intrinsic_setjmp*. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
