From nobody Sat Nov 23 23:56:24 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1728666862; cv=none; d=zohomail.com; s=zohoarc; b=fVw73w38aWMgqYdWMQOniZUt/CNZB5k5aQysDiKwqKr/ibmxYDnSPQas4XuSGrKe9/YmbAw8UBpzJyDTra6XQ3FgotNMmOxMPtFQImHEK0syC2WaqxeE2+wnPk9ZjkQi5BN50Z6xdc1XKQY7n6/MEp/7diU3obIfsoGzOZEzPIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728666862; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6DbehZlttuAvRWwiYZMnj8a7+ZQoZJPyuQGCQjndPlg=; b=LobLvx4Jctg9ObGOY50J85GowV7fys7o9drSgcUoZXbgA9EMUGfwn9vcE25ijH+Ekd16OKZW2RI/OzlSP1ar5EkFU2B1ODeFiZ/lROFWFf2KKYkCk3BrM7vbdlDTXw3aVEJfrlwQEX6jJrhORMqQlkEzuahgqSFqodeNPXGlMFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1728666862364356.4037352172005; Fri, 11 Oct 2024 10:14:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1szJ6z-00042F-8I; Fri, 11 Oct 2024 13:07:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szJ4U-0000hD-3Z for qemu-devel@nongnu.org; Fri, 11 Oct 2024 13:04:58 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1szHdX-0007DQ-Im for qemu-devel@nongnu.org; Fri, 11 Oct 2024 11:33:05 -0400 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-331-YRpffWhYMVa2hLL6YqNgKg-1; Fri, 11 Oct 2024 11:33:01 -0400 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a9959df649aso160986766b.1 for ; Fri, 11 Oct 2024 08:33:01 -0700 (PDT) Received: from avogadro.local ([151.81.124.37]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99a80dcdc3sm226799066b.172.2024.10.11.08.32.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2024 08:32:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728660782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6DbehZlttuAvRWwiYZMnj8a7+ZQoZJPyuQGCQjndPlg=; b=GLT8TaFnksScPdM6/Rl9KX1M0vpAjRR/tx4Ht7MB5rbCdgsnQ7zhMWkEkrniGSFFPoY7/c ALPWfZo+9IHa/PePgYiXWN6FP24gzLZztCGJGwJYBQygqYVXmZ3Rxj4RYIDIjQ+epknoB0 kzhLFt797B1sTgU5WG43Ot4SAIkETFQ= X-MC-Unique: YRpffWhYMVa2hLL6YqNgKg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728660779; x=1729265579; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6DbehZlttuAvRWwiYZMnj8a7+ZQoZJPyuQGCQjndPlg=; b=igVCv+04sIey12XzTsrf4Tm0empC0uIBh+9XG4kRxIz64c+sTaL67otvz4gZHIPYCV eU9NEepDiO1jZBLiZI9c/aiIQ+dqbOv7ZGkMkvBBSv3H1FZdJy2gl5qcT+CCJZ/EJCTD DIHbCOXxxNX5jHKp9m1CiNozMocC8Gcc5sLXq11EynCF4cSE5WJ7M6GhQtDn/V6ZAKGd C14Ql3aNhwQlK7WNGOG89413/NYNQEo3qLdMjW66VzW5vQJQST5qYZfF3Snkgbtm4G29 Sng+6j5d2ZIZUKIlzlIo1WIekxFY1zKFXvYjWVEfTypfmBRG6iEusBYNqRLlbBc5q7UR FsHw== X-Gm-Message-State: AOJu0YwUw1LSiKrSggDVV53VsCzJWn4nJOPIA1SNXkO+lvBvBoAel3M+ X9R5G0vHkZFOg4lGFccD7k+SpeEjRETgaU2T0ODmItlXt2KFYG0FvPBqixqLgp6c5QUtGYsqfvP 1uNWKrQ6ClAa8VmD70jWWp+FUSJpEDojZQNvD9++NbrNFGHm2rx9Z7xf9pobYZKvs9+EzFPPjeB rqrote3Ok/RdxgKnH9JLPiH7i0sTOXC7AvN5pUskg= X-Received: by 2002:a17:907:7ea0:b0:a99:4e35:9a25 with SMTP id a640c23a62f3a-a99e3e448b8mr4951666b.44.1728660778992; Fri, 11 Oct 2024 08:32:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEd6dKcEVQeXImMg6X2cIvVnP9H1eSwNVOvD6ZxjT4wnGLbhw8L2jOuH0AQyoTiwzBFpJXa4w== X-Received: by 2002:a17:907:7ea0:b0:a99:4e35:9a25 with SMTP id a640c23a62f3a-a99e3e448b8mr4948266b.44.1728660778444; Fri, 11 Oct 2024 08:32:58 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: Manos Pitsidianakis , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PULL v3 06/18] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag Date: Fri, 11 Oct 2024 17:32:14 +0200 Message-ID: <20241011153227.81770-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241011153227.81770-1-pbonzini@redhat.com> References: <20241011153227.81770-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.15, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1728666864225116600 From: Manos Pitsidianakis Rust crates, introduced from the next commit onwards, can optionally 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 >=3D 2.72. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Manos Pitsidianakis Link: https://lore.kernel.org/r/23f7b0cc9801d315f5d7835e30d775e133ec2fb9.17= 27961605.git.manos.pitsidianakis@linaro.org Signed-off-by: Paolo Bonzini --- meson.build | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index b9a83dfc744..aea419a8317 100644 --- a/meson.build +++ b/meson.build @@ -948,7 +948,9 @@ have_xen_pci_passthrough =3D get_option('xen_pci_passth= rough') \ ################ =20 # When bumping glib minimum version, please check also whether to increase -# the _WIN32_WINNT setting in osdep.h according to the value from glib +# the _WIN32_WINNT setting in osdep.h according to the value from glib. +# You should also check if any of the glib.version() checks +# below can also be removed. glib_req_ver =3D '>=3D2.66.0' glib_pc =3D dependency('glib-2.0', version: glib_req_ver, required: true, method: 'pkg-config') @@ -998,6 +1000,9 @@ glib =3D declare_dependency(dependencies: [glib_pc, gm= odule], # TODO: remove this check and the corresponding workaround (qtree) when # the minimum supported glib is >=3D 2.75.3 glib_has_gslice =3D glib.version().version_compare('<2.75.3') +# Check whether glib has the aligned_alloc family of functions. +# +glib_has_aligned_alloc =3D glib.version().version_compare('>=3D2.72.0') =20 # override glib dep to include the above refinements meson.override_dependency('glib-2.0', glib) @@ -2529,6 +2534,7 @@ config_host_data.set('CONFIG_TIMERFD', cc.has_functio= n('timerfd_create')) config_host_data.set('HAVE_COPY_FILE_RANGE', cc.has_function('copy_file_ra= nge')) 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_allo= c) config_host_data.set('HAVE_OPENPTY', cc.has_function('openpty', dependenci= es: util)) config_host_data.set('HAVE_STRCHRNUL', cc.has_function('strchrnul')) config_host_data.set('HAVE_SYSTEM_FUNCTION', cc.has_function('system', pre= fix: '#include ')) --=20 2.46.2