From patchwork Sun Feb 22 11:51:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Sune X-Patchwork-Id: 3585 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B27CAB484; Sun, 22 Feb 2015 12:51:34 +0100 (CET) Received: from mx.bisdn.de (mx.bisdn.de [185.27.182.31]) by dpdk.org (Postfix) with ESMTP id 15D99B43C for ; Sun, 22 Feb 2015 12:51:33 +0100 (CET) Received: from [192.168.1.102] (g225153230.adsl.alicedsl.de [92.225.153.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx.bisdn.de (Postfix) with ESMTPSA id 45BBAA1250 for ; Sun, 22 Feb 2015 12:51:32 +0100 (CET) Message-ID: <54E9C2C0.3090108@bisdn.de> Date: Sun, 22 Feb 2015 12:51:28 +0100 From: Marc Sune User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: dev@dpdk.org References: <1396546285-29972-1-git-send-email-cchemparathy@tilera.com> <2601191342CEEE43887BDE71AB9772580EF948F7@IRSMSX105.ger.corp.intel.com> In-Reply-To: <2601191342CEEE43887BDE71AB9772580EF948F7@IRSMSX105.ger.corp.intel.com> Subject: Re: [dpdk-dev] [PATCH] mk: add support for gdb debug info generation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" I don't like the proposed patch, but I am recovering this old thread because I agree on the problem statement. On 04/04/14 11:57, Ananyev, Konstantin wrote: > Hi Cyril, > We already do have 'EXTRA_CFLAGS' and 'EXTRA_LDFLAGS' that you can use to enable debug, or any other compiler/linker options you need. > Wonder, why that is not enough? EXTRA_FLAGS var affects all the DPDK libraries. I was wondering why setting individually: only. No one would ever use something compiled in DEBUG in production anyway. I always end up modifying manually Makefiles in the lib library that I am interested in having insides, overriding CFLAGS=-O3, which is not that nice. Marc > Thanks > Konstantin > > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Cyril Chemparathy > Sent: Thursday, April 03, 2014 6:31 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] mk: add support for gdb debug info generation > > 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. :-) > > Signed-off-by: Cyril Chemparathy > --- > config/defconfig_x86_64-default-linuxapp-gcc | 1 + > mk/toolchain/gcc/rte.vars.mk | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/config/defconfig_x86_64-default-linuxapp-gcc b/config/defconfig_x86_64-default-linuxapp-gcc > index f11ffbf..3b36efd 100644 > --- a/config/defconfig_x86_64-default-linuxapp-gcc > +++ b/config/defconfig_x86_64-default-linuxapp-gcc > @@ -67,6 +67,7 @@ CONFIG_RTE_ARCH_X86_64=y # CONFIG_RTE_TOOLCHAIN="gcc" > CONFIG_RTE_TOOLCHAIN_GCC=y > +CONFIG_RTE_TOOLCHAIN_DEBUG=n > > # > # Use intrinsics or assembly code for key routines diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk index 0edb93f..81ed3fa 100644 > --- a/mk/toolchain/gcc/rte.vars.mk > +++ b/mk/toolchain/gcc/rte.vars.mk > @@ -68,6 +68,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 > -- > 1.8.3.1 > diff --git a/config/common_linuxapp b/config/common_linuxapp index 2f9643b..04adc0d 100644 --- a/config/common_linuxapp +++ b/config/common_linuxapp @@ -127,7 +127,7 @@ CONFIG_RTE_LIBRTE_KVARGS=y # Compile generic ethernet library # CONFIG_RTE_LIBRTE_ETHER=y -CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n +CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=y to put an example, does not set -g and -O0 in that particular module