From ef6309ed444bf35f99d8f455c41b014774205619 Mon Sep 17 00:00:00 2001 From: Francisco Javier Trujillo Mata Date: Sat, 24 Aug 2024 17:38:24 +0200 Subject: [PATCH] Add parameter to allow compiling with gprof flags --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 321f2f4d..384582fd 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,7 @@ AC_CHECK_LIB([z], [compress]) AC_C_CONST 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]) # Checks for library functions. @@ -73,6 +74,9 @@ AC_SUBST(PSPSDK_LIBDIR) # CFLAGS and CXXFLAGS used to build pspsdk libraries. 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" if test "$with_pthread" = no ; then PSPSDK_CFLAGS="$PSPSDK_CFLAGS -DPSP_WITHOUT_PTHREAD"