qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Sean Bruno" <sbruno@freebsd.org>,
	"Ed Maste" <emaste@freebsd.org>, "Warner Losh" <imp@freebsd.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Willian Rampazzo" <willianr@redhat.com>,
	"Yonggang Luo" <luoyonggang@gmail.com>,
	"Nathan Whitehorn" <nwhitehorn@freebsd.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Li-Wen Hsu" <lwhsu@freebsd.org>
Subject: Re: [PATCH 1/3] build: validate that system capstone works before using it
Date: Mon, 28 Jun 2021 08:54:24 +0200	[thread overview]
Message-ID: <4ee4016a-5973-599c-c85e-3acae238ffa8@redhat.com> (raw)
In-Reply-To: <20210625172211.451010-2-berrange@redhat.com>

On 25/06/2021 19.22, Daniel P. Berrangé wrote:
> Some versions of capstone have shipped a broken pkg-config file which
> puts the -I path without the trailing '/capstone' suffix. This breaks
> the ability to "#include <capstone.h>". Upstream and most distros have
> fixed this, but a few stragglers remain, notably FreeBSD.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>   meson.build | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index d8a92666fb..9979ddae71 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1425,6 +1425,19 @@ if capstone_opt in ['enabled', 'auto', 'system']
>                           kwargs: static_kwargs, method: 'pkg-config',
>                           required: capstone_opt == 'system' or
>                                     capstone_opt == 'enabled' and not have_internal)
> +
> +  # Some versions of capstone have broken pkg-config file
> +  # that reports a wrong -I path, causing the #include to
> +  # fail later. If the system has such a broken version
> +  # do not use it.
> +  if capstone.found() and not cc.compiles('#include <capstone.h>',
> +                                          dependencies: [capstone])
> +    capstone = not_found
> +    if capstone_opt == 'system'
> +      error('system capstone requested, it it does not appear to work')
> +    endif
> +  endif

Reviewed-by: Thomas Huth <thuth@redhat.com>



  reply	other threads:[~2021-06-28  6:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25 17:22 [PATCH 0/3] ci: use cirrus-run to utilize Cirrus CI from GitLab CI Daniel P. Berrangé
2021-06-25 17:22 ` [PATCH 1/3] build: validate that system capstone works before using it Daniel P. Berrangé
2021-06-28  6:54   ` Thomas Huth [this message]
2021-06-30 20:54   ` Willian Rampazzo
2021-07-05 12:06   ` Alex Bennée
2021-06-25 17:22 ` [PATCH 2/3] gitlab: support for FreeBSD 12, 13 and macOS 11 via cirrus-run Daniel P. Berrangé
2021-06-28  7:28   ` Thomas Huth
2021-06-28  8:33     ` Daniel P. Berrangé
2021-06-30 18:58   ` Wainer dos Santos Moschetta
2021-06-30 20:35     ` Daniel P. Berrangé
2021-07-05 10:35       ` Alex Bennée
2021-06-25 17:22 ` [PATCH 3/3] cirrus: delete FreeBSD and macOS jobs Daniel P. Berrangé
2021-06-28  7:29   ` Thomas Huth
2021-06-30 19:00   ` Wainer dos Santos Moschetta
2021-06-30 20:52   ` Willian Rampazzo
2021-06-28  7:34 ` [PATCH 0/3] ci: use cirrus-run to utilize Cirrus CI from GitLab CI Thomas Huth
2021-06-28  8:28   ` Daniel P. Berrangé
2021-07-05 10:32 ` Alex Bennée

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=4ee4016a-5973-599c-c85e-3acae238ffa8@redhat.com \
    --to=thuth@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=emaste@freebsd.org \
    --cc=f4bug@amsat.org \
    --cc=imp@freebsd.org \
    --cc=luoyonggang@gmail.com \
    --cc=lwhsu@freebsd.org \
    --cc=nwhitehorn@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sbruno@freebsd.org \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.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).