From nobody Sat Nov 15 20:50:01 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; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1747125315; cv=none; d=zohomail.com; s=zohoarc; b=VEzeVLZ+uAEtEyXO0g8sa8rcwS1hYj0mBOqNy3t23t7vM8m6QaEdOx5+aizk7zSD3s+F7mlveANsChbvnsPPht1h1hqLwd/x2cXXOeLIgQiijvZ+RaTg1ijjJ/1RRPIKmEIyg+1+zbdMB4+Al0qhDFm2bo5Y8IJOXSmdHAhtgMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747125315; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=TqM99o8hq6ejXQr8Ag8go9dDfz10eSysRHw7IIJ+3sg=; b=DR3bn9BiyT2YQKEceMEZsvoYwqtLxNsZVYtJvCCJYBE/piEEhNetIKwoCgC3BwK7yx4PkAIe/C3L1Jy48GkIcFmFlytE2BK6/w190mTx/0GcoxROOS3n+YApWilnT28R1a++bnaEo58FI47wvDid5bD70amV8xnEqS50uPVO2yo= 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=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1747125315972766.0306633404233; Tue, 13 May 2025 01:35:15 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uEl5P-0005Y4-3w; Tue, 13 May 2025 04:34:03 -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 1uEl5M-0005RH-M6 for qemu-devel@nongnu.org; Tue, 13 May 2025 04:34:00 -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 1uEl5I-0006Qa-LA for qemu-devel@nongnu.org; Tue, 13 May 2025 04:34:00 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-397-lpSzAbdyMqalurRxKN1qBg-1; Tue, 13 May 2025 04:33:51 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6363A180056F; Tue, 13 May 2025 08:33:50 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.32.62]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8CCFF1943282; Tue, 13 May 2025 08:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1747125235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=TqM99o8hq6ejXQr8Ag8go9dDfz10eSysRHw7IIJ+3sg=; b=FqLixeSpmxYsaG9KVKWzp1y/El++rer19D8BOIqVi+z4oyBm0rTpQiZRF8BNwIbdwmZx5I PdWh88Q005Tjq1HvGkhzn9WYlcFLEKLUDA0ZcMX/tjZZabuMaDh15+PLPGgr/NDPvE8cuO SlBw/rULx6v3PzAwXcIQAnqimNNejBw= X-MC-Unique: lpSzAbdyMqalurRxKN1qBg-1 X-Mimecast-MFC-AGG-ID: lpSzAbdyMqalurRxKN1qBg_1747125230 From: Thomas Huth To: Paolo Bonzini , qemu-devel@nongnu.org, Peter Maydell Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Brad Smith Subject: [PATCH] meson.build: Compile common_ss files with right system header include paths Date: Tue, 13 May 2025 10:33:43 +0200 Message-ID: <20250513083343.148497-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 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=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.551, 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_H5=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: 1747125317632116600 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Since commit 6f4e8a92bbd ("hw/arm: make most of the compilation units common"), compilation of some arm machines (like musicpal) fails on certain host systems like OpenBSD 7.6/7.7 since headers like don't reside in /usr/include and we currently don't add the right CFLAGS for the common files to include the additional header search paths. Add a loop similar to what we already did in commit 727bb5b477e6 to fix it. With this fix applied, we can now also drop the explicit dependency on pixman for the arm musicpal machine. Fixes: 6f4e8a92bbd ("hw/arm: make most of the compilation units common") Signed-off-by: Paolo Bonzini [thuth: Add commit message + changes in hw/arm/meson.build] Signed-off-by: Thomas Huth --- meson.build | 27 ++++++++++++++++----------- hw/arm/meson.build | 2 +- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index 5ac64075be7..7131aa2b21d 100644 --- a/meson.build +++ b/meson.build @@ -3228,6 +3228,7 @@ config_devices_mak_list =3D [] config_devices_h =3D {} config_target_h =3D {} config_target_mak =3D {} +config_base_arch_mak =3D {} =20 disassemblers =3D { 'alpha' : ['CONFIG_ALPHA_DIS'], @@ -3419,6 +3420,11 @@ foreach target : target_dirs config_all_devices +=3D config_devices endif config_target_mak +=3D {target: config_target} + + # build a merged config for all targets with the same TARGET_BASE_ARCH + target_base_arch =3D config_target['TARGET_BASE_ARCH'] + config_base_arch =3D config_base_arch_mak.get(target_base_arch, {}) + co= nfig_target + config_base_arch_mak +=3D {target_base_arch: config_base_arch} endforeach target_dirs =3D actual_target_dirs =20 @@ -4099,28 +4105,27 @@ common_all =3D static_library('common', =20 # construct common libraries per base architecture hw_common_arch_libs =3D {} -foreach target : target_dirs - config_target =3D config_target_mak[target] - target_base_arch =3D config_target['TARGET_BASE_ARCH'] +foreach target_base_arch, config_base_arch : config_base_arch_mak + if target_base_arch in hw_common_arch + base_arch_hw =3D hw_common_arch[target_base_arch].apply(config_base_ar= ch, strict: false) + base_arch_common =3D common_ss.apply(config_base_arch, strict: false) =20 - # check if already generated - if target_base_arch in hw_common_arch_libs - continue - endif + lib_deps =3D base_arch_hw.dependencies() + foreach dep : base_arch_common.dependencies() + lib_deps +=3D dep.partial_dependency(compile_args: true, includes: t= rue) + endforeach =20 - if target_base_arch in hw_common_arch target_inc =3D [include_directories('target' / target_base_arch)] - src =3D hw_common_arch[target_base_arch] lib =3D static_library( 'hw_' + target_base_arch, build_by_default: false, - sources: src.all_sources() + genh, + sources: base_arch_hw.sources() + genh, include_directories: common_user_inc + target_inc, implicit_include_directories: false, # prevent common code to access cpu compile time # definition, but still allow access to cpu.h c_args: ['-DCPU_DEFS_H', '-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOF= TMMU'], - dependencies: src.all_dependencies()) + dependencies: lib_deps) hw_common_arch_libs +=3D {target_base_arch: lib} endif endforeach diff --git a/hw/arm/meson.build b/hw/arm/meson.build index 5098795f61d..8e3bf495dbf 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -8,7 +8,7 @@ arm_common_ss.add(when: 'CONFIG_HIGHBANK', if_true: files('= highbank.c')) arm_common_ss.add(when: 'CONFIG_INTEGRATOR', if_true: files('integratorcp.= c')) arm_common_ss.add(when: 'CONFIG_MICROBIT', if_true: files('microbit.c')) arm_common_ss.add(when: 'CONFIG_MPS3R', if_true: files('mps3r.c')) -arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: [pixman, files('musicp= al.c')]) +arm_common_ss.add(when: 'CONFIG_MUSICPAL', if_true: files('musicpal.c')) arm_common_ss.add(when: 'CONFIG_NETDUINOPLUS2', if_true: files('netduinopl= us2.c')) arm_common_ss.add(when: 'CONFIG_OLIMEX_STM32_H405', if_true: files('olimex= -stm32-h405.c')) arm_common_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx.c', 'npc= m7xx_boards.c')) --=20 2.49.0