pspdev / pspsdk

An open-source SDK for PSP homebrew development.
Other
856 stars 143 forks source link

configure doesn't set default CFLAGS #190

Closed rofl0r closed 6 months ago

rofl0r commented 6 months ago

usually when using autoconf-based configure scripts, the expectation is that when no CFLAGS are passed by the user (via command line or environment variables), the default of "-O2 -g" is used. this is currently not the case with the configure script. therefore, if the SDK is built without setting CFLAGS externally, no optimization nor debug info is available.

diamant3 commented 6 months ago

I think there's a related discussions on that one, please check here: https://github.com/pspdev/pspdev/discussions/57, hopefully it fits to you

rofl0r commented 6 months ago

odd, last time i didn't set my own CFLAGS="-O2 -g", stuff was built without debug info, i had to recompile the sdk because psplinkusb jumps into nirvana if crt0.o has no debug info.

rofl0r commented 6 months ago

according to https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Preset-Output-Variables.html AC_PROG_CC sets the default CFLAGS. i checked the makefile and indeed -O2 -g is there now. i wonder what went wrong when crt*.o was built without -g? anyway this seems to be fixed.