From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from USCAMAIL.TILERA.COM (uscamail.tilera.com [12.218.212.166]) by dpdk.org (Postfix) with ESMTP id B5BFA682E for ; Thu, 3 Apr 2014 19:29:51 +0200 (CEST) Received: from sclab-apps-2.internal.tilera.com (10.108.0.15) by USCAEXCH2.tad.internal.tilera.com (10.103.0.33) with Microsoft SMTP Server (TLS) id 14.0.702.0; Thu, 3 Apr 2014 10:31:27 -0700 Received: (from cchemparathy@localhost) by sclab-apps-2.internal.tilera.com (8.14.4/8.14.4/Submit) id s33HVQnZ030006; Thu, 3 Apr 2014 10:31:26 -0700 X-Authentication-Warning: sclab-apps-2.internal.tilera.com: cchemparathy set sender to cchemparathy@tilera.com using -f From: Cyril Chemparathy To: Date: Thu, 3 Apr 2014 10:31:25 -0700 Message-ID: <1396546285-29972-1-git-send-email-cchemparathy@tilera.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain Subject: [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: , X-List-Received-Date: Thu, 03 Apr 2014 17:29:52 -0000 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