[dpdk-dev] [PATCH] mk: add support for gdb debug info generation
Gonzalez Monroy, Sergio
sergio.gonzalez.monroy at intel.com
Mon Jun 22 09:44:41 CEST 2015
On 19/06/2015 22:29, Cyril Chemparathy wrote:
> From: Cyril Chemparathy <cchemparathy at tilera.com>
>
> It is often useful to build with debug enabled, we add a config
> (CONFIG_RTE_TOOLCHAIN_DEBUG) to do so.
>
> Note: This patch does not include corresponding changes for ICC. The
> author pleads abject ignorance in this regard, and welcomes
> recommendations. :-)
>
> Change-Id: I499e591e1b7d71df751fd40d1fdcbe6975eeeb27
> Signed-off-by: Cyril Chemparathy <cchemparathy at ezchip.com>
> ---
> mk/toolchain/gcc/rte.vars.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk
> index 0f51c66..22c4c1f 100644
> --- a/mk/toolchain/gcc/rte.vars.mk
> +++ b/mk/toolchain/gcc/rte.vars.mk
> @@ -71,6 +71,11 @@ ifeq (,$(findstring -O0,$(EXTRA_CFLAGS)))
> endif
> endif
>
> +ifeq ($(CONFIG_RTE_TOOLCHAIN_DEBUG),y)
> +TOOLCHAIN_CFLAGS += -g -ggdb
> +TOOLCHAIN_LDFLAGS += -g -ggdb
> +endif
> +
> WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
> WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith
> WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
I don't think you need to modify the makefiles and introduce a new
compile time option for this.
The same result can be easily achieved by setting EXTRA_CFLAGS in the
command line. ie:
$ make install T=x86_64-native-linuxapp-gcc EXTRA_CFLAGS='-g -ggdb'
Sergio
More information about the dev
mailing list