All of lore.kernel.org
 help / color / mirror / Atom feed
From: "罗勇刚(Yonggang Luo)" <luoyonggang@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] meson.build: Don't look for libudev for static builds
Date: Sat, 3 Oct 2020 15:24:31 +0800	[thread overview]
Message-ID: <CAE2XoE-RnJ2j732JfxDA2A9O0Bp4KJ2rGG0LTjrDMKvRox-VBg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9M_BP9mnZHCLM93aYvMxrRHYFELQZ3FvsyH3hNvXtHDA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1497 bytes --]

On Fri, Oct 2, 2020 at 9:11 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
>
> On Fri, 2 Oct 2020 at 14:05, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > On 02/10/20 14:35, Peter Maydell wrote:
> > >
> > > It would be better to do the "see if a static library is present"
> > > test. This isn't too hard to do in configure (compare that
> > > six line fix to the detection of libgio). Hopefully it is
> > > not too hard to do in meson ?
> >
> > Yes, something like:
> >
> > if enable_static
> >   skeleton = 'int main(void) { return 0; }'
> >   if not cc.links(skeleton, dependencies: libudev)
> >     if get_option('mpath').enabled()
> >         error('Cannot link with libudev')
> >       else
> >         warning('Cannot link with libudev, disabling')
> >         libudev = not_found
> >       endif
> >     endif
> >   endif
> > endif
>
> This duplicates the information that the thing that depends
> on libudev is mpath. Can we put this in a wrapper around
> dependency() so that we could just say something like
>   libudev = compile_checked_dependency('libudev',
>                        required: get_option('mpath').enabled(),
>                        static: enable_static)
>
Hi Bonzini,
This looks like a frequently used function, can we upstrem to meson?


> for those dependencies that want to do the "does this compile"
> check ?
>
> thanks
> -- PMM
>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

[-- Attachment #2: Type: text/html, Size: 2084 bytes --]

  parent reply	other threads:[~2020-10-03  7:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 10:52 [PATCH] meson.build: Don't look for libudev for static builds Peter Maydell
2020-10-02 11:15 ` 罗勇刚(Yonggang Luo)
2020-10-02 12:03   ` Paolo Bonzini
2020-10-02 12:02 ` Paolo Bonzini
2020-10-02 12:35   ` Peter Maydell
2020-10-02 12:36     ` Peter Maydell
2020-10-02 12:43       ` Paolo Bonzini
2020-10-02 13:01         ` Peter Maydell
2020-10-02 13:05     ` Paolo Bonzini
2020-10-02 13:09       ` Peter Maydell
2020-10-02 14:08         ` Paolo Bonzini
2020-10-02 14:18           ` Peter Maydell
2020-10-02 15:14             ` Paolo Bonzini
2020-10-02 15:28               ` Peter Maydell
2020-10-03  7:24         ` 罗勇刚(Yonggang Luo) [this message]
2020-10-03  7:50           ` Paolo Bonzini
2020-10-03  8:28             ` 罗勇刚(Yonggang Luo)
2020-10-03  8:42               ` Paolo Bonzini
2020-10-03  8:29             ` 罗勇刚(Yonggang Luo)
2020-10-03  8:43               ` Paolo Bonzini
2020-10-03  9:32                 ` 罗勇刚(Yonggang Luo)
2020-10-12 15:33 [PATCH 00/10] target/arm: Various v8.1M minor features Peter Maydell
2020-10-12 15:33 ` [PATCH] meson.build: Don't look for libudev for static builds Peter Maydell

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=CAE2XoE-RnJ2j732JfxDA2A9O0Bp4KJ2rGG0LTjrDMKvRox-VBg@mail.gmail.com \
    --to=luoyonggang@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.