jmeubank / tdm-gcc

TDM-GCC is a cleverly disguised GCC compiler for Windows!
https://jmeubank.github.io/tdm-gcc/
584 stars 49 forks source link

Profiling not working on v9.2.0 anymore #62

Closed Ilir-Liburn closed 1 year ago

Ilir-Liburn commented 1 year ago

Hello,

profiling worked last time I made a build (half year ago), now I get bunch of errors. I don't understand, what could cause this? I use TDM-GCC-32, but I switched to TDM-GCC-64 because profiling is totally unusable on 32bit version.

Plus, I get

../include/os_e.h:75:12: warning: '_putenv_s' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]

while using TDM-GCC-64 instead of TDM-GCC-32. But why (both are v9.2.0)?

Here is the profiling error:

C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x22): undefined reference togcov_indire ct_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x9a): undefined reference to `gcov_indire ct_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x2e0): undefined reference to __gcov_indir ect_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0xc7b): undefined reference togcov_indir ect_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x16eb): undefined reference to `gcov_indi rect_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x1eac): more undefined references to __gco v_indirect_call_profiler_v3' follow C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x2a61): undefined reference togcovone value_profiler' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x2f39): undefined reference to __gcov_indi rect_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x3455): undefined reference togcov_indi rect_call_profiler_v3' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text+0x34ac): undefined reference to `gcovone value_profiler' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.data+0x520): undefined reference to `gcov_merge _add' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.data+0x538): undefined reference to __gcov_merge _single' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.data+0x558): undefined reference togcov_merge _time_profile' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text.startup+0x8): undefined reference to __gcov _init' C:/TDM-GCC-64/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: objfile.o:objfile.c:(.text.exit+0x1): undefined reference togcov_ex it' collect2.exe: error: ld returned 1 exit status `

Ilir-Liburn commented 1 year ago

Never mind, I switched back to old build only to realize that I forgot -fprofile-generate switch on shared library. Closing...