DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: aisha <atammy.dpdk@bsd.ac>
Cc: dev@dpdk.org
Subject: Re: [patch] allow using standard ar from the build ini files instead of 'ar' string
Date: Mon, 28 Feb 2022 17:33:28 +0000	[thread overview]
Message-ID: <Yh0HaLNh3r1X9hvb@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <bd9dd451-0af2-25af-ade6-bdf687d2de23@bsd.ac>

On Mon, Feb 28, 2022 at 10:54:28AM -0500, aisha wrote:
> Hi,
> 
> I've attached a patch, from Gentoo, which uses the *ar* binary passed to
> meson when available, instead of 'ar', which may not be available, for
> instance when cross compiling, or having multiple gcc versions present, like
> in Gentoo.
> 
> This should not have any regressions, as when the binary is not available it
> uses the same logic as the original.
> 
> Aisha
> 

> diff --git a/buildtools/meson.build b/buildtools/meson.build
> index 400b88f251..d886bfb1dc 100644
> --- a/buildtools/meson.build
> +++ b/buildtools/meson.build
> @@ -24,15 +24,20 @@ binutils_avx512_check = (py3 + files('binutils-avx512-check.py') +
>  # select library and object file format
>  pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]
>  pmdinfogen = py3 + files('pmdinfogen.py')
> +ar = ''
> +if cc.get_id() == 'gcc' or host_machine.system() != 'windows'
> +    ar = 'ar'
> +else
> +    ar = 'llvm-ar'
> +endif
> +ar_bin = find_program('ar', required: false)
> +if ar_bin.found()
> +    ar = ar_bin.full_path()
> +endif
> +pmdinfo += ar
>  if host_machine.system() == 'windows'
> -    if cc.get_id() == 'gcc'
> -        pmdinfo += 'ar'
> -    else
> -        pmdinfo += 'llvm-ar'
> -    endif
>      pmdinfogen += 'coff'
>  else
> -    pmdinfo += 'ar'
>      pmdinfogen += 'elf'
>  endif
>  
> diff --git a/meson.build b/meson.build
> index 937f6110c0..35650ab20d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -12,7 +12,7 @@ project('DPDK', 'C',
>              'default_library=static',
>              'warning_level=2',
>          ],
> -        meson_version: '>= 0.49.2'
> +        meson_version: '>= 0.55.0'
>  )

I don't believe this should be part of this patch, as bumping the minimum
meson version is not something we want to do just now.

/Bruce

  parent reply	other threads:[~2022-02-28 17:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 15:54 aisha
2022-02-28 17:06 ` Stephen Hemminger
2022-02-28 17:33 ` Bruce Richardson [this message]
2022-02-28 17:54 ` Bruce Richardson

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=Yh0HaLNh3r1X9hvb@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=atammy.dpdk@bsd.ac \
    --cc=dev@dpdk.org \
    /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).