On Sun, Mar 30, 2025 at 11:12 AM Tom Kacvinsky <tkacv...@gmail.com> wrote:
> > > On Sun, Mar 30, 2025 at 8:57 AM LIU Hao <lh_mo...@126.com> wrote: > >> 在 2025-3-30 20:29, Tom Kacvinsky 写道: >> > Hi, >> > >> > >> > I happened to notice that with a GCC 12.1.0 build (a custom build with >> UCRT >> > support >> > >> > before UCRT support was available in baseline MinGW-w64) that >> > libgcc_s_seh-1.dll >> > >> > depends on libwinpthread-1.dll. Compare and contrast with Linux where >> > libgcc-s.so.1 >> > >> > doesn't depend on libpthread.so.0 >> > >> > Is there a reason for this? Or is it a superfluous dependency? >> >> I suspect those dependencies are from libgcov and emutls. >> >> [1] >> >> https://github.com/gcc-mirror/gcc/blob/e0886d8ad4c51919c349d0b31f2bec3acbc79e14/libgcc/libgcov-interface.c#L41-L80 >> [2] >> https://github.com/gcc-mirror/gcc/blob/e0886d8ad4c51919c349d0b31f2bec3acbc79e14/libgcc/emutls.c#L73-L79 >> >> > I looked over the *.a and *.o files in the libgcc build directory. I > didn't see anything related > to gcov or emutls. Moreover -pthread was on the link line. And so was > unwind-sjlj_s,o. I > did see emutls_s.o on the link line. > > I wonder how much of all of this is necessary for building an SEH only > exception handler. > > I will get the full link line. I have to copy it from my work laptop > where I am doing the work. > > Full link line /c/DEV/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/./gcc/xgcc -B/c/DEV/MINGW-packages/mingw-w64-gcc/src/build-UCRT64/./gcc/ -L/ucrt64/x86_64-w64-mingw32/lib -L/ucrt64/lib -isystem /ucrt64/x86_64-w64-mingw32/include -isystem /ucrt64/include -B/ucrt64/x86_64-w64-mingw32/bin/ -B/ucrt64/x86_64-w64-mingw32/lib/ -isystem /ucrt64/x86_64-w64-mingw32/include -isystem /ucrt64/x86_64-w64-mingw32/sys-include -O2 -I../../../gcc-14.2.0/libgcc/../winsup/w32api/include -g -march=nocona -msahf -mtune=generic -O2 -pipe -DIN_GCC -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pthread -shared -nodefaultlibs libgcc.map.def -Wl,--out-implib,./shlib/libgcc_s.a.tmp -o ./shlib/libgcc_s_seh-1.dll.tmp -g -march=nocona -msahf -mtune=generic -O2 -pipe -B./ _chkstk_s.o _chkstk_ms_s.o _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _mulbitint3_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _divmoddi4_s.o _udivdi3_s.o _umoddi3_s.o _udivmoddi4_s.o _udiv_w_sdiv_s.o _divmodbitint4_s.o cpuinfo_s.o sfp-exceptions_s.o _divhc3_s.o _mulhc3_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o fixsfbitint_s.o floatbitintsf_s.o fixdfbitint_s.o floatbitintdf_s.o extendhfsf2_s.o extendhfdf2_s.o extendhftf2_s.o extendhfxf2_s.o extendsfdf2_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o extendbfsf2_s.o trunctfhf2_s.o truncxfhf2_s.o truncdfhf2_s.o truncsfhf2_s.o trunctfsf2_s.o truncdfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o trunctfbf2_s.o truncxfbf2_s.o truncdfbf2_s.o truncsfbf2_s.o trunchfbf2_s.o fixtfbitint_s.o floatbitinttf_s.o fixhfti_s.o fixunshfti_s.o floattihf_s.o floatuntihf_s.o floattibf_s.o floatuntibf_s.o eqhf2_s.o fixxfbitint_s.o floatbitinthf_s.o floatbitintbf_s.o floatbitintxf_s.o enable-execute-stack_s.o hardcfr_s.o strub_s.o unwind-seh_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o libgcc.a -Wl,-lpthread -lmingwthrd -lmingw32 -lmingwex -lmoldname -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 > Tom > _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public