Compiling for gprof

Hi all,

We have an in-house developed executable running on the target which is using 75% CPU, and we want to profile it to see what is going on. I have tried adding "-pg" to

TARGET_CFLAGS+= -pg -fhonour-copts $(if $(CONFIG_GCC_VERSION_4_4)$(CONFIG_GCC_VERSION_4_5),,-Wno-error=unused-but-set-variable) -Wno-error=unused-result

but a total system compile complains in strace-4.8.

I would prefer to add the "-pg" flag only to the executable and it's libraries.

Does the toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc- support "-pg"?

Is it possible to add the "-pg" flag to select packages?

Thanks in advance

You can append this flag to TARGET_CFLAGS only in the Makefile of your package from your in-house developed executable.