From nobody Sun Nov 16 00:56:16 2025 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 ARC-Seal: i=1; a=rsa-sha256; t=1745470282; cv=none; d=zohomail.com; s=zohoarc; b=dOA08qMtXbTbIWMQhnAFBhINPbf86FUWsty7fv424SskKnGldTsGzmu6Fh0WSWClTz63ZesVvGQH9WMiXoJX4JAKScM4ducDkBCVAw3ufqfe4fDEZRi5K3jYQXXpBG9cuTB1Y8zX8LJ7me8e34FqBjCT9hFNpfWi5ibfLlfCPOs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1745470282; 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=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=hOTJG9C9dIsjVt/Q7exL1byexbdaLgYSjRxjZe6urY4CTfX7YboklgVYDfGrSzx9itVYAM0bKb4fpkPSz5owVoLoGrkoio3PXXwcJiZpsL7tVI31IWMrV/lo76ZlpzPp1Yw9ZvgBc+7JpZH7xy5ditUNNcXbtshprCjLvn2ON7g= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1745470282271242.18713536691598; Wed, 23 Apr 2025 21:51:22 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u7oXu-0005h0-UI; Thu, 24 Apr 2025 00:50:46 -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 1u7oXq-0005gc-OX for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:43 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u7oXp-0003Vm-4Z for qemu-devel@nongnu.org; Thu, 24 Apr 2025 00:50:42 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-73c17c770a7so681878b3a.2 for ; Wed, 23 Apr 2025 21:50:40 -0700 (PDT) Received: from localhost ([157.82.205.213]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-73e25a9abf2sm448766b3a.122.2025.04.23.21.50.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Apr 2025 21:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1745470239; x=1746075039; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=DPrq9CzCV50UCB2/SbHYi9ueZ4vP5ciVY12ab9TNqf/wES29+nSnsI63Cuz6mtefev ZVUVpRZlnDTbj9UXyg0S+Pm7I9FEUNMzfUm/7w7nXp4mQ152nrm7+cOvNqVfc30Lknu7 MqcVn4yD7UAEPY+MWEQ2rHSDluCso2ndSLz2ef6aLuuuRbb83JVycZg59dGXlf8i8w8A curUqtR5/MuCmgOlIx+eKywdTe0+VUB4LXxISX42Mm/CLA9Y/HRcSVtt4/ZPK2ZSluYe AkR9lzEbsw2IsVd3pcrD4BUDvB/H1PZmkEaO8PARKLSk79bKfl8RstS2hjI1vE+fRwr9 8DBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745470239; x=1746075039; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UHcKhUy69pRs0cRfr7uvJrTweyJDdDo4Zt7XhLrkh30=; b=ikJkb3r8G1Ayse7Gm/1/LILzeONgVHnPZY3s9/Pb1Mq7Mz8IDojSUPt49AIbbiA79H B4eYlKWKOGCkaGD1T0HahPOSSDHoc41oCjXumPN2XRhEJWFfBv6qFoKJyDkvpZYxTspE qDXstKbCQNO0R6/IOyEGV8UQsKNGUT5IFK1sr4CTZsy9QQbqsEcsKfCqpLITh6JbVUI1 M7gswqRioGPWq4jHEfL0eQjagGHTsyMZjprKQse5RRj/wn98wYJKUBJOrIkRkJwnbPQz Wdww8bow93Moocbvk8frZXtxVmKPcCPVYZwJa9A8vfKG+OQsEeK5tH+2nMsNe2P5u7kD opAQ== X-Gm-Message-State: AOJu0YxmVGSzMYSgyUVm/wNe6HGYfMk1BlMqtdDPgzaq7gAmJIlvwW5+ P71aJOmyuzbg5miunCTrcVyyDMP9qUt6ASk6XL1v4ATHk07E3+5+Z6rwWCT63LA= X-Gm-Gg: ASbGncupmhxR0yUUBm6fL2ge+Zn7igJWoofX6osh/njEO+UG/BfBReNhR8FUBcmHcup 71ctqAHMTlz/Y8VSshU7I0Z/ukd5gpa6FcfTOu1KZL/d/hNHhVDW25b6T4YQqJsLKCSZd4Ss1jD 5Mj5g9PrS+e+u7va+RYQ1lvrgKSuNpISW06I5+Bm7RMgjE22UXyC+JDaAutDbkY7jRo+ZgkG64X nh+NyVxNmT73S530WP1mIvFcRuXA8FLbS/xtrxLHML7knlDNoNwSe1LCcXlF+eozT3x87YyI0Lc ZdCSCHW60/gzmYMcbGZS1ef02dgktQZTxmtk61EVwip5 X-Google-Smtp-Source: AGHT+IEra/vFCi2BDDzY1r4nUErC79fofw+U0qF1kAowqiak+bzwuPamKZO0tJFniQlkIfGd/bsu5g== X-Received: by 2002:a05:6a00:2285:b0:73e:970:731 with SMTP id d2e1a72fcca58-73e24aecfcamr1785136b3a.16.1745470239055; Wed, 23 Apr 2025 21:50:39 -0700 (PDT) From: Akihiko Odaki Date: Thu, 24 Apr 2025 13:50:11 +0900 Subject: [PATCH 1/4] meson: Use has_header_symbol() to check getcpu() MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250424-buildsys-v1-1-97655e3b25d7@daynix.com> References: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> In-Reply-To: <20250424-buildsys-v1-0-97655e3b25d7@daynix.com> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Eric Blake , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Pierrick Bouvier , devel@daynix.com, Akihiko Odaki X-Mailer: b4 0.15-dev-edae6 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=2607:f8b0:4864:20::434; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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 @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1745470283842019100 The use of gnu_source_prefix in the detection of getcpu() was ineffective because the header file that declares getcpu() when _GNU_SOURCE is defined was not included. Pass sched.h to has_header_symbol() so that the existence of the declaration will be properly checked. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 --- meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 41f68d38069b..c0ecb6feab77 100644 --- a/meson.build +++ b/meson.build @@ -2635,7 +2635,6 @@ config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_f= unction('clock_adjtime')) config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) config_host_data.set('CONFIG_POSIX_FALLOCATE', cc.has_function('posix_fall= ocate')) -config_host_data.set('CONFIG_GETCPU', cc.has_function('getcpu', prefix: gn= u_source_prefix)) config_host_data.set('CONFIG_SCHED_GETCPU', cc.has_function('sched_getcpu'= , prefix: '#include ')) # Note that we need to specify prefix: here to avoid incorrectly # thinking that Windows has posix_memalign() @@ -2713,6 +2712,8 @@ config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE', config_host_data.set('CONFIG_FIEMAP', cc.has_header('linux/fiemap.h') and cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) +config_host_data.set('CONFIG_GETCPU', + cc.has_header_symbol('sched.h', 'getcpu', prefix: gnu= _source_prefix)) config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) --=20 2.49.0