From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by dpdk.org (Postfix) with ESMTP id A15F23B5 for ; Wed, 4 Mar 2015 10:44:32 +0100 (CET) Received: by wiwl15 with SMTP id l15so29053216wiw.3 for ; Wed, 04 Mar 2015 01:44:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=6eQtCBfGVlmUfOaslmU7odfAHJbTXR/4UtX9kUa8h6k=; b=RG+ySlSBhkbv2pf0Egw4GG6mq4zhprNMM+PUKN+A4huQoz6/EyotMIDxWNBCraBZb5 gsBaBCJwh+0xbpEEtJzLc5E4XH2NQuK0nX1+N8bcsffyI52xavWMSof7BOGgWyP6nERJ hyXjQB6Gz/gu1dz2Eoum1hRauJh2t5vTHDS1bow5PhXDTVCsAez7mDlP+1MIUbOcE9yU uQqM/i56+PegcxAz/uStE8JcTfV+kLufU9HXGoWVTFbw8lhIPlGiQbAfzCIxdjEmlCcn rpRaKevET/AMhV9JLZ49X6eH7EeKjPfCtJhaU3lJgwwLyuUZa+NxO288LRCA5AIXtvuO NrWQ== X-Gm-Message-State: ALoCoQnSPt778PkHL7AJ3tb9Ll0LjMByaiodww5IgxQmT72aHA1Z7LUrBTS3zbuMqe1tEP6fP5YD X-Received: by 10.180.74.206 with SMTP id w14mr10829005wiv.71.1425462272379; Wed, 04 Mar 2015 01:44:32 -0800 (PST) Received: from [10.16.0.195] (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id v6sm6284252wix.8.2015.03.04.01.44.31 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 01:44:31 -0800 (PST) Message-ID: <54F6D401.3030009@6wind.com> Date: Wed, 04 Mar 2015 10:44:33 +0100 From: Olivier MATZ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.3.0 MIME-Version: 1.0 To: Marc Sune , Bruce Richardson References: <1396546285-29972-1-git-send-email-cchemparathy@tilera.com> <2601191342CEEE43887BDE71AB9772580EF948F7@IRSMSX105.ger.corp.intel.com> <54E9C2C0.3090108@bisdn.de> <54F49E9D.6070201@bisdn.de> <20150303093355.GA7300@bricha3-MOBL3> <54F5A6CF.2090203@bisdn.de> <54F5ABCA.4010707@redhat.com> <54F5AF73.1060109@bisdn.de> <20150303130301.GA11084@bricha3-MOBL3> <54F5B6CD.7090209@bisdn.de> In-Reply-To: <54F5B6CD.7090209@bisdn.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org 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: , X-List-Received-Date: Wed, 04 Mar 2015 09:44:32 -0000 Hi Marc, On 03/03/2015 02:27 PM, Marc Sune wrote: > > On 03/03/15 14:03, Bruce Richardson wrote: >> On Tue, Mar 03, 2015 at 01:56:19PM +0100, Marc Sune wrote: >> [...] >> I believe that the global option of overriding the CFLAGS is already >> sufficiently >> covered - including being documented in programmers guide - by >> EXTRA_CFLAGS. > > To be honest, I tried EXTRA_CFLAGS at some point in time (probably 1.5 > or 1.6, but maybe not stable releases) and it did not work, so I ended > up doing it manually, and never tried again. > > It does work now with CFLAGS, I didn't try LDFLAGS, but it does not for > EXTRA_CPPFLAGS apparently (unless I made some stupid mistake): > > marc@dpdk:~/dpdk$ git diff > diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c > index 4e70fa0..4a1e538 100644 > --- a/lib/librte_kni/rte_kni.c > +++ b/lib/librte_kni/rte_kni.c > @@ -61,6 +61,10 @@ > > #define KNI_MEM_CHECK(cond) do { if (cond) goto kni_fail; } while (0) > > +#ifdef TEST_CPPFLAGS > + #error TEST_CPPFLAGS defined > +#endif > + > /** > * KNI context > */ > > marc@dpdk:~/dpdk$ export EXTRA_CPPFLAGS='-DTEST_CPPFLAGS' > marc@dpdk:~/dpdk$ make install T=x86_64-native-linuxapp-gcc > ... > Build complete The reason why it does not work is described in the documentation: ./doc/guides/prog_guide/build_app.rst:* CPPFLAGS: The flags to use to provide flags to the C preprocessor (only useful when assembling .S files) ./doc/guides/prog_guide/dev_kit_build_system.rst:* CPPFLAGS: Flags to use to give flags to C preprocessor (only useful when assembling .S files). ./doc/guides/prog_guide/dev_kit_build_system.rst:* EXTRA_CPPFLAGS: The content of this variable is appended after CPPFLAGS when using a C preprocessor on assembly files. I think your test would work with EXTRA_CFLAGS. I don't say it's the proper behavior, but at least it's coherent with the documentation. Regards, Olivier