From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mk: add debug target Date: Fri, 02 Feb 2018 10:07:31 +0100 Message-ID: <7264515.xsl8mJ6Wl0@xps> References: <20171216001350.90436-1-ferruh.yigit@intel.com> <9672510.c4JnJd36Tx@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, John McNamara To: Ferruh Yigit Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id A32301B16F for ; Fri, 2 Feb 2018 10:08:19 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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?