From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id D48954F94 for ; Mon, 27 Aug 2018 14:21:03 +0200 (CEST) Received: by mail-wr1-f67.google.com with SMTP id v17-v6so13417008wrr.9 for ; Mon, 27 Aug 2018 05:21:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to:openpgp :user-agent; bh=njwbdMY1rAI3ytMMZ4Tord8rhJczCEeA/INP/jxkTEk=; b=AlscwpJAlj/LZIhBLm3DL51iTD4lBPsFwmmI/X8IhxH90cvOnwBg9QkWLq4qBYR7YF 2gcjAvuJupiDHndGuGbJlziLrSF4WpqRD/itW0fZF2DaLbG8nkwJ5LmAF72U5piVXciu YC88CQK1n42kgIeWOzPhaRn37OcSNg0BawdPxLT41+fNjivze0CBqp06IFXKneuiKT1s 0NcSIqBinOIkq1MgYPlbHDSV9h9jL90kKsJzdHxCvZrFj6RZa2sxgwfyCh3CCJeg3Yqf aUH1PXGCuZObPp76XbhOPW+AkzlGYTRQ6Pc2cavP+uRAmPM0ar7lcwdcHXnj0sG6A+sc cQAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:openpgp:user-agent; bh=njwbdMY1rAI3ytMMZ4Tord8rhJczCEeA/INP/jxkTEk=; b=guqeJp6RdxGHHxMCljicc1IwZr+S3YDuJVL6zlFekOze5jB9QfK4OLWfBdknYERI5c VTJdq9yb89vK15VMpci/X2ffIL4JdQ+7XyL/HmerGRUIal2ww/HERD+AMoLQ4ktc6Fx2 ydFQ1SdGZluKR7zzc5iys/AwbHjtso7uWqiD0t8dJsBOMpN2mUknbXhd4orP+KS7WfIt pnX7JpOTgu0TjcQHKutWgixFvuY5FNr81NdrnYb2WVvrx6MtIjdN8A9XaoXHEih8n1PS PdvwxcxKiPcl0AdojPKdoJkLCHQuSC8zdKSmEPRwyeE+u3JLZFvIgpMnn9pFrhQFNdhO UxUw== X-Gm-Message-State: APzg51DtyaCtTBXmL5ZV+JvGTE7iHS0V0NB7f/wMG8JtuqIgVVMYc4TG pKV+53tn6u3MUxqKkiJ5mQLd X-Google-Smtp-Source: ANB0Vda6E4NJoPmr5ihqlSROwwB351nG920FwQzCoGUqUHTbiRabmpmTLHWEIhCgi701XgDNcbSvlQ== X-Received: by 2002:adf:aa9c:: with SMTP id h28-v6mr8729241wrc.149.1535372463644; Mon, 27 Aug 2018 05:21:03 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 72-v6sm19721084wrb.48.2018.08.27.05.21.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Aug 2018 05:21:03 -0700 (PDT) Date: Mon, 27 Aug 2018 14:20:48 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Bruce Richardson Cc: dev@dpdk.org, Yongseok Koh , Shahaf Shuler Message-ID: <20180827122048.ki5crhjwbnrnqj2i@laranjeiro-vm.dev.6wind.com> References: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com> <20180827112411.GA26392@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180827112411.GA26392@bricha3-MOBL.ger.corp.intel.com> OpenPGP: id=A0075DA8F66A5949 preference=signencrypt User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 1/2] build: add extra cflags ldflags to meson option 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, 27 Aug 2018 12:21:04 -0000 On Mon, Aug 27, 2018 at 12:24:11PM +0100, Bruce Richardson wrote: > On Mon, Aug 27, 2018 at 01:10:52PM +0200, Nelio Laranjeiro wrote: > > Almost equivalent to the make system build which uses those options > > through environment variables (EXTRA_{CFLAGS,LDFLAGS}). > > > > Signed-off-by: Nelio Laranjeiro > > --- > > drivers/meson.build | 2 +- > > meson_options.txt | 2 ++ > > 2 files changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/meson.build b/drivers/meson.build > > index f94e2fe67..008aac62c 100644 > > --- a/drivers/meson.build > > +++ b/drivers/meson.build > > @@ -11,7 +11,7 @@ driver_classes = ['common', > > 'event', # depends on common, bus, mempool and net. > > 'raw'] # depends on common, bus, mempool, net and event. > > > > -default_cflags = machine_args > > +default_cflags = machine_args + [get_option('extra_cflags'), get_option('extra_ldflags')] > > if cc.has_argument('-Wno-format-truncation') > > default_cflags += '-Wno-format-truncation' > > endif > > diff --git a/meson_options.txt b/meson_options.txt > > index c84327858..da6373a2c 100644 > > --- a/meson_options.txt > > +++ b/meson_options.txt > > @@ -22,3 +22,5 @@ option('use_hpet', type: 'boolean', value: false, > > description: 'use HPET timer in EAL') > > option('tests', type: 'boolean', value: true, > > description: 'build unit tests') > > +option('extra_cflags', type: 'string', description: 'Extra compiler flags') > > +option('extra_ldflags', type: 'string', description: 'Extra linker flags') > > This should not be needed. Meson should pick up CFLAGS and LDFLAGS from the > environment without having to add options for them. > > https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages > > /Bruce Indeed this works with the CLFAGS/LDFLAGS way, but to find correctly the library dependencies, it also needs to have the LD_LIBRARY_PATH set with the correct path. This patch will be discarded in the next version. Thanks, -- Nélio Laranjeiro 6WIND