Re: [fix] improve GCC options in Makefile, make "no-debug" build turn off ****ertions
Reply #1 –
No inlines was something, that was needed for useful profiling imho. Otherwise the calling graph was all messed up in the past. I need to check this in the current setting though.
Extract from current GCC manual:
-ffunction-sections
-fdata-sections
Place each function or data item into its own section in the output file if the target supports arbitrary sections. The name of the function or the name of the data item determines the section's name in the output file.
Use these options on systems where the linker can perform optimizations to improve locality of reference in the instruction space. Most systems using the ELF object format and SPARC processors running Solaris 2 have linkers with such optimizations. AIX may have these optimizations in the future.
Only use these options when there are significant benefits from doing so. When you specify these options, the ****embler and linker will create larger object and executable files and will also be slower. You will not be able to use gprof on all systems if you specify this option and you may have problems with debugging if you specify both this option and -g.
(Also the linux kernel is apparently compiled with those enabled.)
Last time I checked (which is same years ago, Simutrans benefitted from them. Although lots of dead code was removed since then.
A last thing: Should ****erting not be disabled anyhow, when DEBUG is not set? I remember at least one such bug report.