skeeto / w64devkit

Portable C and C++ Development Kit for x64 (and x86) Windows
The Unlicense
2.66k stars 185 forks source link

Add back gprof #109

Closed ducalex closed 4 months ago

ducalex commented 4 months ago

In commit c6ae17490043e82cd8c9ef68e8e1a67701a0eeaf gprof was removed. However, gprof can still work if the program is compiled with -pg -no-pie. So I think it should be added back because it's useful if one knows about that caveat!

skeeto commented 4 months ago

I removed it because it didn't work between w64devkit 1.6.0 and 1.13.0 even with -no-pie. PIE effectively became mandatory in Binutils 2.36 and -no-pie did nothing. GCC 12 makes PIE optional again, but I hadn't noticed the change.

https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg267070.html

I just restored gprof in 6708972b and confirmed that it works normally.

ducalex commented 4 months ago

Thank you! I admire how well informed you are about all aspects that goes in w64devkit :) .