All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Joelle van Dyne <j@getutm.app>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v7 05/11] osdep: build with non-working system() function
Date: Sat, 23 Jan 2021 13:45:12 +0000	[thread overview]
Message-ID: <CAFEAcA8KZqxjDd0H7faF=YtkyY-XFB2WoP31qv_2ecFij_rLqQ@mail.gmail.com> (raw)
In-Reply-To: <CA+E+eSAhNNBxY06a5iQj9ANpgmYZk0Kf6LYQPduCLwNmr1UQvA@mail.gmail.com>

On Sat, 23 Jan 2021 at 03:18, Joelle van Dyne <j@getutm.app> wrote:
On Fri, Jan 22, 2021 at 3:17 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>> Can we do the "does system() exist?" check in meson.build ?

>> config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system'))

> Unfortunately, this doesn't work for iOS, which defines system() but
> throws a compile time error if you try to call it.

That's odd -- as far as I can tell the meson implementation
of has_function() does what I expected it to do, ie
"try to compile and link a little program that uses the
function, and see if it successfully links":
https://github.com/mesonbuild/meson/blob/39ede12aa5b27376341df85bc9ec254913f044bd/mesonbuild/compilers/mixins/clike.py#L791
There's some initial cleverness there too, so I guess some
part of that must be what's tripping us up.

In any case, I think we should be doing new checks in
meson.build, not configure.  Paolo, what's the right
way to do a meson "really compile this program and
check it built" test?

thanks
-- PMM


  reply	other threads:[~2021-01-23 13:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-22 20:11 [PATCH v7 00/11] iOS and Apple Silicon host support Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 01/11] block: feature detection for host block support Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 02/11] configure: cross-compiling with empty cross_prefix Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 03/11] configure: check for sys/disk.h Joelle van Dyne
2021-01-22 23:16   ` Peter Maydell
2021-01-22 20:11 ` [PATCH v7 04/11] slirp: feature detection for smbd Joelle van Dyne
2021-01-22 22:49   ` Peter Maydell
2021-01-22 23:12     ` Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 05/11] osdep: build with non-working system() function Joelle van Dyne
2021-01-22 23:12   ` Peter Maydell
2021-01-22 23:17     ` Peter Maydell
2021-01-23  3:18       ` Joelle van Dyne
2021-01-23 13:45         ` Peter Maydell [this message]
2021-01-25  8:04           ` Paolo Bonzini
2021-01-26  0:12             ` Joelle van Dyne
2021-01-26  0:42               ` Paolo Bonzini
2021-01-26  9:29               ` Peter Maydell
2021-01-22 20:11 ` [PATCH v7 06/11] darwin: remove redundant dependency declaration Joelle van Dyne
2021-01-22 22:43   ` Peter Maydell
2021-01-22 20:11 ` [PATCH v7 07/11] darwin: fix cross-compiling for Darwin Joelle van Dyne
2021-01-22 22:41   ` Peter Maydell
2021-01-22 20:11 ` [PATCH v7 08/11] configure: cross compile should use x86_64 cpu_family Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 09/11] block: check availablity for preadv/pwritev on mac Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 10/11] darwin: detect CoreAudio for build Joelle van Dyne
2021-01-22 20:11 ` [PATCH v7 11/11] darwin: remove 64-bit build detection on 32-bit OS Joelle van Dyne
2021-01-22 22:39   ` 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='CAFEAcA8KZqxjDd0H7faF=YtkyY-XFB2WoP31qv_2ecFij_rLqQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=j@getutm.app \
    --cc=pbonzini@redhat.com \
    --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.