Add parameter to allow compiling with gprof flags

This commit is contained in:
Francisco Javier Trujillo Mata
2024-08-24 17:38:24 +02:00
parent f2d349aa2d
commit ef6309ed44

View File

@@ -33,6 +33,7 @@ AC_CHECK_LIB([z], [compress])
AC_C_CONST AC_C_CONST
AC_C_BIGENDIAN AC_C_BIGENDIAN
AC_ARG_WITH(gprofflags, [ --with-gprofflags build with gprof flag included], [], [--with_gprofflags=no])
AC_ARG_WITH(pthread, [ --with-pthread build with pthread support], [], [with_pthread=yes]) AC_ARG_WITH(pthread, [ --with-pthread build with pthread support], [], [with_pthread=yes])
# Checks for library functions. # Checks for library functions.
@@ -73,6 +74,9 @@ AC_SUBST(PSPSDK_LIBDIR)
# CFLAGS and CXXFLAGS used to build pspsdk libraries. # CFLAGS and CXXFLAGS used to build pspsdk libraries.
PSPSDK_CFLAGS="$CFLAGS -mno-gpopt -Wall -Werror -D_PSP_FW_VERSION=600" PSPSDK_CFLAGS="$CFLAGS -mno-gpopt -Wall -Werror -D_PSP_FW_VERSION=600"
if test "$with_gprofflags" = yes ; then
PSPSDK_CFLAGS="$PSPSDK_CFLAGS -pg -g"
fi
PSPSDK_CXXFLAGS="$PSPSDK_CFLAGS -fno-exceptions -fno-rtti" PSPSDK_CXXFLAGS="$PSPSDK_CFLAGS -fno-exceptions -fno-rtti"
if test "$with_pthread" = no ; then if test "$with_pthread" = no ; then
PSPSDK_CFLAGS="$PSPSDK_CFLAGS -DPSP_WITHOUT_PTHREAD" PSPSDK_CFLAGS="$PSPSDK_CFLAGS -DPSP_WITHOUT_PTHREAD"