From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 455EB1B2C8 for ; Mon, 5 Feb 2018 10:23:07 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eiczb-0001kl-Qv; Mon, 05 Feb 2018 10:23:17 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Mon, 05 Feb 2018 10:23:02 +0100 Date: Mon, 5 Feb 2018 10:23:02 +0100 From: Olivier Matz To: Thomas Monjalon Cc: Ferruh Yigit , dev@dpdk.org, John McNamara Message-ID: <20180205092302.w4pnay6r5c3elbng@platinum> References: <20171216001350.90436-1-ferruh.yigit@intel.com> <9672510.c4JnJd36Tx@xps> <7264515.xsl8mJ6Wl0@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7264515.xsl8mJ6Wl0@xps> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] mk: add debug target X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Feb 2018 09:23:07 -0000 On Fri, Feb 02, 2018 at 10:07:31AM +0100, Thomas Monjalon wrote: > 01/02/2018 18:04, Ferruh Yigit: > > On 1/30/2018 11:40 PM, Thomas Monjalon wrote: > > > 16/12/2017 01:13, Ferruh Yigit: > > >> Add "debug" target to build library with debug symbols and optimization > > >> disabled. > > >> > > >> This is shortcut for exiting method to compile with > > >> EXTRA_CFLAGS="-O0 -g3" > > >> > > >> Signed-off-by: Ferruh Yigit > > >> --- > > >> + debug build library with debug symbols > > > [...] > > >> +.PHONY: debug > > >> +debug: > > >> + $(Q)$(MAKE) EXTRA_CFLAGS="-O0 -g3" > > > > > > This target will override any EXTRA_CFLAGS, > > > so we cannot build in debug mode with more extra cflags this way. > > > > How about EXTRA_CFLAGS+="-O0 -g3" > > which is not override EXTRA_CFLAGS but merge them, can be ok? > > I am not sure it works. Have you tested? Instead of adding a new target, what about, having: make DEBUG=1 The DEBUG variable could be used by the rte.*.mk to set the specific flags, before the EXTRA_* flags.