DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Cc: dev@dpdk.org, Yongseok Koh <yskoh@mellanox.com>,
	Shahaf Shuler <shahafs@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] build: add extra cflags ldflags to meson option
Date: Mon, 27 Aug 2018 12:24:11 +0100	[thread overview]
Message-ID: <20180827112411.GA26392@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com>

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 <nelio.laranjeiro@6wind.com>
> ---
>  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

  parent reply	other threads:[~2018-08-27 11:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-27 11:10 Nelio Laranjeiro
2018-08-27 11:10 ` [dpdk-dev] [PATCH 2/2] net/mlx: add meson build support Nelio Laranjeiro
2018-08-27 11:24 ` Bruce Richardson [this message]
2018-08-27 12:20   ` [dpdk-dev] [PATCH 1/2] build: add extra cflags ldflags to meson option Nélio Laranjeiro
     [not found] <Message-Id: <7812af2267017898332783e934bef9478814ae96.1535361299.git.nelio.laranjeiro@6wind.com>
2018-08-27 12:42 ` [dpdk-dev] [PATCH v2] net/mlx: add meson build support Nelio Laranjeiro
2018-08-28 15:45   ` Bruce Richardson
2018-08-29  9:34     ` Nélio Laranjeiro
2018-08-29 10:01       ` Bruce Richardson
2018-08-29 12:44         ` Nélio Laranjeiro
2018-08-29 10:00     ` Luca Boccassi
2018-08-29 11:59       ` Nélio Laranjeiro
2018-08-29 12:28         ` Luca Boccassi
2018-08-31 16:24         ` Luca Boccassi
2018-08-29 13:48   ` [dpdk-dev] [PATCH v3] " Nelio Laranjeiro
2018-08-30 14:46     ` Bruce Richardson
2018-08-31  7:05       ` Nélio Laranjeiro
2018-08-31  7:16     ` [dpdk-dev] [PATCH v4] " Nelio Laranjeiro
2018-09-05 11:47       ` [dpdk-dev] [PATCH v5] " Shahaf Shuler
2018-09-07 10:34         ` Bruce Richardson
2018-09-13  9:22           ` Bruce Richardson
2018-09-13 10:12             ` Shahaf Shuler
2018-09-13 10:51               ` Bruce Richardson
2018-09-13 12:11         ` [dpdk-dev] [PATCH v6 1/2] net/mlx5: support meson build Shahaf Shuler
2018-09-13 12:41           ` Bruce Richardson
2018-09-16  9:01             ` Shahaf Shuler
2018-09-13 12:11         ` [dpdk-dev] [PATCH v6 2/2] net/mlx4: " Shahaf Shuler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180827112411.GA26392@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=shahafs@mellanox.com \
    --cc=yskoh@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).