All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Gustavo Romero" <gustavo.romero@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Junjie Mao" <junjie.mao@intel.com>,
	"Zhao Liu" <zhao1.liu@intel.com>
Subject: Re: [PATCH RESEND v9 6/9] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag
Date: Wed, 28 Aug 2024 14:15:25 +0100	[thread overview]
Message-ID: <87wmk03i1e.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240828-rust-pl011-v9-6-35579191f17c@linaro.org> (Manos Pitsidianakis's message of "Wed, 28 Aug 2024 07:11:47 +0300")

Manos Pitsidianakis <manos.pitsidianakis@linaro.org> writes:

> Rust crates, introduced from the next commit onwards, use the glib
> allocator API and need to know whether g_aligned_alloc etc are
> available.
>
> This commit adds a define in config_host_data that depends on glib
> version >= 2.72.
>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
>  meson.build | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index 05446acbc684a7521ecc9b3f80b98e2cec1a60cf..7f05466d128776ad8dbf403179734e6831b023c0 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -979,6 +979,9 @@ glib = declare_dependency(dependencies: [glib_pc, gmodule],
>  # TODO: remove this check and the corresponding workaround (qtree) when
>  # the minimum supported glib is >= 2.75.3
>  glib_has_gslice = glib.version().version_compare('<2.75.3')
> +# Check whether glib has the aligned_alloc family of functions.
> +# <https://docs.gtk.org/glib/func.aligned_alloc.html>
> +glib_has_aligned_alloc = glib.version().version_compare('>=2.72.0')

Minor suggestion: you could update the comment for the main glib probe:

  # When bumping glib minimum version, please check also whether to increase
  # the _WIN32_WINNT setting in osdep.h according to the value from
  # glib. You should also check if any of the glib.version() checks
  # bellow can also be removed.

Anyway:

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>


>  
>  # override glib dep to include the above refinements
>  meson.override_dependency('glib-2.0', glib)
> @@ -2508,6 +2511,7 @@ config_host_data.set('CONFIG_TIMERFD', cc.has_function('timerfd_create'))
>  config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_range'))
>  config_host_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs'))
>  config_host_data.set('HAVE_GLIB_WITH_SLICE_ALLOCATOR', glib_has_gslice)
> +config_host_data.set('HAVE_GLIB_WITH_ALIGNED_ALLOC', glib_has_aligned_alloc)
>  config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependencies: util))
>  config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul'))
>  config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', prefix: '#include <stdlib.h>'))

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


  reply	other threads:[~2024-08-28 13:15 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28  4:11 [PATCH RESEND v9 0/9] Add Rust build support, ARM PL011 device impl Manos Pitsidianakis
2024-08-28  4:11 ` [PATCH RESEND v9 1/9] Require meson version 1.5.0 Manos Pitsidianakis
2024-08-28 10:43   ` Alex Bennée
2024-08-28  4:11 ` [PATCH RESEND v9 2/9] build-sys: Add rust feature option Manos Pitsidianakis
2024-08-28 11:26   ` Alex Bennée
2024-08-28  4:11 ` [PATCH RESEND v9 3/9] configure, meson: detect Rust toolchain Manos Pitsidianakis
2024-08-28 12:11   ` Alex Bennée
2024-08-28 12:28   ` Daniel P. Berrangé
2024-09-04 11:03     ` Paolo Bonzini
2024-09-04 11:32       ` Paolo Bonzini
2024-08-28  4:11 ` [PATCH RESEND v9 4/9] rust: add bindgen step as a meson dependency Manos Pitsidianakis
2024-08-28  4:11 ` [PATCH RESEND v9 5/9] .gitattributes: add Rust diff and merge attributes Manos Pitsidianakis
2024-08-28  4:11 ` [PATCH RESEND v9 6/9] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag Manos Pitsidianakis
2024-08-28 13:15   ` Alex Bennée [this message]
2024-08-28  4:11 ` [PATCH RESEND v9 7/9] rust: add crate to expose bindings and interfaces Manos Pitsidianakis
2024-08-28 13:08   ` Alex Bennée
2024-08-30  1:19     ` Junjie Mao
2024-08-30  6:43       ` Manos Pitsidianakis
2024-08-30  8:50         ` Junjie Mao
2024-08-30 11:03       ` Alex Bennée
2024-08-31  8:25         ` Manos Pitsidianakis
2024-09-02  5:58           ` Junjie Mao
2024-09-06  7:56             ` Paolo Bonzini
2024-09-04 11:01   ` Paolo Bonzini
2024-09-05  3:05     ` Junjie Mao
2024-09-05  7:50     ` Manos Pitsidianakis
2024-08-28  4:11 ` [PATCH RESEND v9 8/9] rust: add utility procedural macro crate Manos Pitsidianakis
2024-08-28  4:11 ` [PATCH RESEND v9 9/9] rust: add PL011 device model Manos Pitsidianakis
2024-09-04 11:04   ` Paolo Bonzini
2024-09-06 10:41   ` Paolo Bonzini
2024-08-28 13:18 ` [PATCH RESEND v9 0/9] Add Rust build support, ARM PL011 device impl Alex Bennée
2024-09-04 11:31 ` Paolo Bonzini

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=87wmk03i1e.fsf@draig.linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=gustavo.romero@linaro.org \
    --cc=junjie.mao@intel.com \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=zhao1.liu@intel.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 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.