From patchwork Wed May 21 22:34:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 891554 Delivered-To: patch@linaro.org Received: by 2002:adf:e88a:0:b0:3a3:61c9:c5d4 with SMTP id d10csp2355132wrm; Wed, 21 May 2025 15:36:56 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU2kLRmZHpN07qX+JRtIjftjUKg4szITl6d9Omey1hffIW2NUwPITmIuHC55WueBOqyjZSgKA==@linaro.org X-Google-Smtp-Source: AGHT+IGDrz5dfs/fE+tRV3T5PSUulUfqCQtkG2kHa7W71NrM04hvIVNCW5ZkwQWQTIcqwd537Bek X-Received: by 2002:a05:6e02:5e09:b0:3dc:787f:2bc4 with SMTP id e9e14a558f8ab-3dc787f2e6cmr99871955ab.18.1747867016191; Wed, 21 May 2025 15:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747867016; cv=none; d=google.com; s=arc-20240605; b=ly51DXfdVEu06JTA7GYH4hZ/XnmKzzaibFglNo4xXCRTznpjxq04ST3PZSrkNsGkjq fmHa6UnrPACJzG0Nd26SqYF8mzr70wV6POzO72hIZJT1Xx7PBy4dfRRwp4+mLSZHGrjp OuFTfrvRgBxcDmsMwgBvLfBrWFv80S/UJv6IlhZg+s9M18wIoWHFp3y5xqHGbMDwnYen KGd+yig0ZhcfnLwBFGcv14LcyHm74aRRwGAinKDC+0hKqb3QjHh3YMPzbwOca9HEy2sy VxiGA9Ailfh9br6qzlCkDu+0q1NW2rjCLiO21eN1uhUedi/1n5TChnJKdC2CduyYZRvh y9Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BzbmByqdOkqyRMXARFIXus2CwGPGDwIxO/jwoX/CbXM=; fh=jpZTer8Lnp0ij2TL+T2yfvfY/N/1F7aXXNGwiZkGqro=; b=K8fQ7RFv+s3eunlrWWVsjGjWNvM/HY6OO6+EIEVT8Uwa0KY7eBgG7lA2C3FLAzuuUB GDK6TJE0/uvzMOkMXEz3dBE47Jl12KSz2kmlY3a+1jWrNVdm8cF6az/oiuCWCHnuvEBK PgdETC6tg6hx7/VOZ+frPoov1aCOAwS0LepWwFNQiX+GyAraJ3MocBKvW23c0l3+2E8X KgPb+t+jJczx0V9Vi4yBY8rynJec/lPOqGnY4DPxt3pi+6KYG18rxzD4cy7dvxhvKUwE iGibPVg1WpyT/PSo6xbtFgg5rUZ1MSb1cEm+LwzCmhssqin2RkKCA7MCjge0HbR7OFta osiA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mmodHKjA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 8926c6da1cb9f-4fbcc4bce17si14480688173.142.2025.05.21.15.36.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 May 2025 15:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mmodHKjA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uHs1O-0001XL-LU; Wed, 21 May 2025 18:34: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 1uHs1M-0001WQ-Hc for qemu-devel@nongnu.org; Wed, 21 May 2025 18:34:45 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uHs19-00050b-TL for qemu-devel@nongnu.org; Wed, 21 May 2025 18:34:42 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-742c96af71dso5322602b3a.0 for ; Wed, 21 May 2025 15:34:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747866868; x=1748471668; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BzbmByqdOkqyRMXARFIXus2CwGPGDwIxO/jwoX/CbXM=; b=mmodHKjAx3LGbFp11BFg0pud8tZnZ5QdR+3iU1I5ku7EpQGwd+kON6PA0uEFUzJXmQ F922vGiHNAQXMo7UowPM1ZVH2RXpBbvg7/jJv55RLUjbJQ7un6m0P8NTViUo3MXeedaC uk0iXPV4YVHnZpOiCNse0Gt0io2eSHiJoptW2x1/BxwvCW9Hp32O21dyi20W6IGlrtSQ v/2ZdvjxcmAZY+AyVDK/wnfURArcrodPccZKZO24ocRScwcqA1pXCmj1Jogwai8Q6Ptf kFFlUlMj+Hbj/cREKdesILN6mcSmZ9jvwPJ5x1YGTApe9+vhlGd9tsafXwNvqctnDmOO dlEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747866868; x=1748471668; 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=BzbmByqdOkqyRMXARFIXus2CwGPGDwIxO/jwoX/CbXM=; b=cRlvLILobtx3T6uGTuZ09i8avzyKda61+B/NiVZ7MxihL8/bXmZ1u5bMRmxdsjxakQ +CAJ5hgHik5IV5NOdJAeM3K9Fduzp6tp3w04Ah37Q3LnkQITwtox/ajIm4/7s8Um0no8 aYEaIbgNiQh++C67CoRUBJf7kQtpTgnX3+7K1NeC+Q22eXlZ4t5o4sWPH/hQVevp/QaT BTBDR41dVZYVggYCWIyDQhs8O4kIxGfwGc1O5034Z5u5kxRx641VR6ggVQnMmi0ioww1 Rppkhxt6YclUYnlgxbrok12ffigf8wpz3qaYed4HxaQhtfcuQHQkbQDy/fd9FE6i0JAx U8TA== X-Gm-Message-State: AOJu0Yw5aTRAZGUjJjZ/5DDSn8GWwadvjm3v35ZIGB2C/NSLO3mNGlFM baLEm9rhHh5B/lBEJy/im90pPynr8e68zuT7U2BSzPMUScuSxBZrJsuBjwl5nAR2rSGcEY5lhkK c81hZ X-Gm-Gg: ASbGnctXSEXjuh0BFAn9pdJrhY818WDaUXNOmRFw0KAdJQJGUFdiZkR4Xhz1IC8/uJ3 EWbbfkIzgEnKTlICXy9O3a9LV2VTDp6Z5yYZHAtWpliyOG+ZFGbBZI5BehGAro80oCxHJBpizRl ZY2rcHh2/hOkvMrovqAeRzz58Ypg+kpL0tNA8nK3hNBB3zgCJc8c4EghXtlJ8kemKvXFJdSagOV zNq5iBg32602LvSEjCg2MUF/brzkjmWjrv6OGk9CRRf1S++Gx0c2jc6LNaAimp300aXXjbKy1Rz BzeKYAgv6qiGCQvAmk+0KwBMx4ME8f5x8MfI9Ez0mGqLcCclOJY= X-Received: by 2002:a17:90b:4a50:b0:301:98fc:9b5a with SMTP id 98e67ed59e1d1-30e7d500953mr32636482a91.6.1747866867942; Wed, 21 May 2025 15:34:27 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b26eaf5a31dsm10165224a12.2.2025.05.21.15.34.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 May 2025 15:34:27 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , Richard Henderson , Peter Maydell , Paolo Bonzini , thuth@redhat.com, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 7/7] meson: merge hw_common_arch in target_common_system_arch Date: Wed, 21 May 2025 15:34:14 -0700 Message-ID: <20250521223414.248276-8-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250521223414.248276-1-pierrick.bouvier@linaro.org> References: <20250521223414.248276-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org No need to keep two different libraries, as both are compiled with exact same flags. As well, rename target common libraries to common_{arch} and system_{arch}, to follow what exists for common and system libraries. Signed-off-by: Pierrick Bouvier --- meson.build | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/meson.build b/meson.build index 087ce7dd20d..f57b051b3d4 100644 --- a/meson.build +++ b/meson.build @@ -4121,7 +4121,6 @@ common_all = static_library('common', dependencies: common_ss.all_dependencies()) # construct common libraries per base architecture -hw_common_arch_libs = {} target_common_arch_libs = {} target_common_system_arch_libs = {} foreach target_base_arch, config_base_arch : config_base_arch_mak @@ -4150,22 +4149,10 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak target_c_args = ['-DCPU_DEFS_H'] target_system_c_args = target_c_args + ['-DCOMPILING_SYSTEM_VS_USER', '-DCONFIG_SOFTMMU'] - if target_base_arch in hw_common_arch - src = hw_common_arch[target_base_arch] - lib = static_library( - 'hw_' + target_base_arch, - build_by_default: false, - sources: src.all_sources() + genh, - include_directories: inc, - c_args: target_system_c_args, - dependencies: src.all_dependencies() + common_deps + system_deps) - hw_common_arch_libs += {target_base_arch: lib} - endif - if target_base_arch in target_common_arch src = target_common_arch[target_base_arch] lib = static_library( - 'target_' + target_base_arch, + 'common_' + target_base_arch, build_by_default: false, sources: src.all_sources() + genh, include_directories: inc, @@ -4175,10 +4162,20 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak target_common_arch_libs += {target_base_arch: lib} endif + # merge hw_common_arch in target_common_system_arch + if target_base_arch in hw_common_arch + hw_src = hw_common_arch[target_base_arch] + if target_base_arch in target_common_system_arch + target_common_system_arch[target_base_arch].add_all(hw_src) + else + target_common_system_arch += {target_base_arch: hw_src} + endif + endif + if target_base_arch in target_common_system_arch src = target_common_system_arch[target_base_arch] lib = static_library( - 'target_system_' + target_base_arch, + 'system_' + target_base_arch, build_by_default: false, sources: src.all_sources() + genh, include_directories: inc, @@ -4373,12 +4370,6 @@ foreach target : target_dirs objects += libuser.extract_objects(src.sources()) arch_deps += src.dependencies() endif - if target_type == 'system' and target_base_arch in hw_common_arch_libs - src = hw_common_arch[target_base_arch].apply(config_target, strict: false) - lib = hw_common_arch_libs[target_base_arch] - objects += lib.extract_objects(src.sources()) - arch_deps += src.dependencies() - endif if target_type == 'system' and target_base_arch in target_common_system_arch_libs src = target_common_system_arch[target_base_arch].apply(config_target, strict: false) lib = target_common_system_arch_libs[target_base_arch]