From nobody Sun Nov 24 02:04:44 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=1728299105; cv=none; d=zohomail.com; s=zohoarc; b=RQaRaH+w5+Pq2H8lMXBTc9LkuywmcH0vhjk8njIL14lkpFLhQtPy1lRC8hukSVL/CGVH5ZRsyVctmwx2ipl01UODmU8do82Hf9MnUHJW+QCoybQsdXCZ2W0zPt8tEqiTa4ydEiNgCJcEVSAHZCYOiSjcpB2N4YZ7zyiHzeQyOcY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1728299105; 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=4LRI0xIJx0eVcqyQ8rbuR3b680cFD6gQYtFnqRaiaLw=; b=ZP6xOR0hoGToNHXmoIxyA1npTCQwN39A4nvFdi577mCqCSAbvwSV7HVvzZhix9pzXVLT1xmeHCkmkChqztGGipz6tU490qArv/fWWEOdPlXM8EC+tcOztEExbYRr5bHwnt8s1rowWstlde4h/pMhP6oOQvBfzOa5/13BqPVpVuw= 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 1728299105045317.32677821903906; Mon, 7 Oct 2024 04:05:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sxlXK-0001ph-WA; Mon, 07 Oct 2024 07:04:23 -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 1sxlXI-0001p5-UT for qemu-devel@nongnu.org; Mon, 07 Oct 2024 07:04:21 -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 1sxlXG-0006Xn-4a for qemu-devel@nongnu.org; Mon, 07 Oct 2024 07:04:20 -0400 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-607-v-m4h_FzOJGw56po67W3lg-1; Mon, 07 Oct 2024 07:04:15 -0400 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb2c5d634so28359125e9.0 for ; Mon, 07 Oct 2024 04:04:15 -0700 (PDT) Received: from avogadro.local ([151.62.111.131]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f86b4aa8dsm88978755e9.43.2024.10.07.04.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 04:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728299056; 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=4LRI0xIJx0eVcqyQ8rbuR3b680cFD6gQYtFnqRaiaLw=; b=PBip5eDMaOm1RQRD4d+doIxeHU2EJjzTxSy3VDQsSvKd4POyHQKT7609lXRDTK7v5/pPEq EMq2dD3L2GmtEU9dK36k0QE1rh0tEPiQzLVLV5DOg2+3VZbbMq3rYaSRuxZbySHHr2sdAk BefIehQVRlLDakGIGXtU74Y+Yw4WXLM= X-MC-Unique: v-m4h_FzOJGw56po67W3lg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728299054; x=1728903854; 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=4LRI0xIJx0eVcqyQ8rbuR3b680cFD6gQYtFnqRaiaLw=; b=hqbiHmMCSXuz79+u7ltalzFsZPbVEjhVwPQhCQbCF3RUU/5IJtMQ8G7HsWzs8wwMYO kEjzmOEeopVCD3iXpFa6wRTdLml89eZToo9dVRK+o3f4tHFWZzN20gvs+5/jCOoWAtgc tvojMUOkLD0KUYQVZXVAMmqh1ZFMaO3ypnzlpWn3xiZDfagMWuz+SVzwpdKS1p0EADup /0KjCF+cS8MriCC0pGG5B7bfLM5Mq7PPySQrqugxFesRjmgWJAKJEZGalKxUPNgOjNn3 iQo8BPKIOcbeB7oydmo6YhjD8+mKdI2q5TYUED2FiHYN2KJ7gpmDfjajszd2WA0tUHAv /Row== X-Gm-Message-State: AOJu0YwNdc6nPxSSyeVcKLoYbxzQjAwYv5sCyelMlAZ4+mLgRmdK+Y1y JmHW/fqqnSbSLUHEYxg1CsaecPx7jAN6ny66sk8FRYmondNQbnUWr31hD3GFPPPQCSOx6VMTJTN 0bpOU2PwVeExJWIfukrFxDemAyJysLOStzDkV2sL0Ksa1PsB+8Qjud4rr6qItmUZPdltLs5wGYJ 2zhrgaEsZg4o3h0JOeUnnJT6KPwz0QZ/XYAyGXlbk= X-Received: by 2002:a05:600c:4514:b0:42c:c37b:4d53 with SMTP id 5b1f17b1804b1-42f859b14bcmr81081085e9.0.1728299053668; Mon, 07 Oct 2024 04:04:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFQl3RdQS0Ey+XMrmGbShDy9oClz+Idenz6hCA8QBPQblVLqjFJnpSQlPuPXC6Aezx1NlVRjw== X-Received: by 2002:a05:600c:4514:b0:42c:c37b:4d53 with SMTP id 5b1f17b1804b1-42f859b14bcmr81080695e9.0.1728299053165; Mon, 07 Oct 2024 04:04:13 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: manos.pitsidianakis@linaro.org, zhao1.liu@intel.com, junjie.mao@intel.com, pierrick.bouvier@linaro.org, alex.bennee@linaro.org Subject: [PULL 06/12] meson.build: add HAVE_GLIB_WITH_ALIGNED_ALLOC flag Date: Mon, 7 Oct 2024 13:03:34 +0200 Message-ID: <20241007110342.1298598-7-pbonzini@redhat.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20241007110342.1298598-1-pbonzini@redhat.com> References: <20241007110342.1298598-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: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.151, 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.01, RCVD_IN_MSPIKE_WL=-0.01, 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: 1728299105908116600 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.1