From patchwork Mon May 5 01:51:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 887398 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp1824211wrq; Sun, 4 May 2025 18:53:46 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXhFoeuFRwOgQ16k2Z9b4gZDF6pzY2e+o8yzkiJwCfoT9vEJnCZAAe/KJkrYXap5Z5sUpefRg==@linaro.org X-Google-Smtp-Source: AGHT+IFKhM0rdHxNSarLbFMsEW+eAq2eJu8bMcCkr3RHieJf0bQRrDbxwXTRn3LYyqDAys6MRg5Y X-Received: by 2002:a05:620a:471e:b0:7c9:4df8:6b88 with SMTP id af79cd13be357-7cae3a8a41fmr860809885a.7.1746410026757; Sun, 04 May 2025 18:53:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746410026; cv=none; d=google.com; s=arc-20240605; b=Qpikyb1FgUxfMwQhcIlKuq4W6GrKaqlUllRxMKMRaDwcE9rVcg3UucypryHk/W74bC Yd/m5tGxDbRLabyjqgQwSuZdJIxU2/UQAOjuJ+PZJFL4wKmQK4JCtUxqakzmV4oyTANV wBwR3JxvnIyOSNgJkWQAokkHbv+GEY0HpodNpxus2Xdr2TrvWRJCXqudAgDqxORBSpFy V3WBxuTMYBpYdydmdV9iHFTnwyUufu2UwORqXSjbuJjTlCHJ215CnepROhUzGLoJUBJP ch7WJa+sjKGV1+fLcDZ3IZKdrH9hPQTY0Dpi/7lT0UWS2hkC22uS8ADflqATZE6YP2X9 qqUQ== 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=+insc5JF0LDgOcxml+QzIIv4GANFmGAhKwH/cRPIB3k=; fh=NjGqp/B1Bwp2wtTnyHxTvlXYBfwRSGY9cE7hmKIZquY=; b=C9aaiIXlqV2MDrtq/OHzUJZlBYrBVBl1VRFammurvzLLsDH3QXuZ9zdd17BiOuoW0/ mG8J4B8T0BGMqjwilfqpuoYWh+j8aHECWB5sYlMMPgn7uIe+C2HRA6ZaYovCLuBmrILQ 7RJ4+0nehWFxBCFBrsGGbnowTdyZ3DhxvgA98odvIFwV175XvVcI/EFO+lIwTkVmwiR4 x9wSu1/YxGBaygIjiruSfEb0RS3ZTchvl6B+8sBIfMcf4L63XmfECE8QzCOBmC9dvuB3 cFky+92IbTsoVGmwkz9jYjfKi0hUE/6BWDOXUS4+Dk5ASAfvCaoMoxIyPZFbPp9G1CIu mgkA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rfwYKKZE; 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 af79cd13be357-7cad24200c7si824421285a.249.2025.05.04.18.53.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 May 2025 18:53:46 -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=rfwYKKZE; 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 1uBl0c-0003rr-QV; Sun, 04 May 2025 21:52:42 -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 1uBl0b-0003qf-5M for qemu-devel@nongnu.org; Sun, 04 May 2025 21:52:41 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uBl0S-0002Tx-Ej for qemu-devel@nongnu.org; Sun, 04 May 2025 21:52:40 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-72d3b48d2ffso3973634b3a.2 for ; Sun, 04 May 2025 18:52:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746409951; x=1747014751; 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=+insc5JF0LDgOcxml+QzIIv4GANFmGAhKwH/cRPIB3k=; b=rfwYKKZEMCRkIU9faGCDwUK7xJ/DEgILUlOMQ+08xKhEFiiBcSanWZLsPJRK+RV5vY x/kkP6C+lsF9KKYxFg3MFKt9AoVToVVHsnx78mSPsUb/7pqsB922OjLkICTTxTmxOY+z n3vXYTeNLHsIJy/DLXMQb58sZ5nEG+hKPV9I50RcuX7PSjHiLc2kMgx2kJYDmKzeHvIV eO1HxBEXizZTpXIqJavja1ItqE33OmWvLJEfGuLa3soOmrBLi1FGnsljIQqOobvk/l/q 6JvkRA3ZFP+4yWbCCNzLNNvTEhOgBRhvWtcSpMzZvp1oiCYvvgdF/1n4ZYNfP04861wO VPkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746409951; x=1747014751; 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=+insc5JF0LDgOcxml+QzIIv4GANFmGAhKwH/cRPIB3k=; b=sNuxmaUEX/Hr0L1rM5A4rj3sjg8HMYcwijQF8dnhAjINrjMoqwlbxhCGD0YSYAW/0N WNhFgFDsh/UtVFXi7jlW4rBaAAzNzVCgxNE1NpJlULTxE38tmLMr00iQy98w4a+shwtr efoL7fU25bwcKorwN0SSc0V0uLR5A/fb+gADax12bEg/+6JSpHy55Hqqa8Q7JoqBWnF7 r7C1X6mITalSlw98KeSlyAtWHRGItRALOfUXjqIVJuXEPcfqeuH9kYoLNnJc9XzsLAxf HLei6XsBZBxreEQBU6+WZSsn5C7lw4xEVzUimdiit8E9wV76MBygII1b+mlgRMAUkUcW ojew== X-Gm-Message-State: AOJu0Yx/Em9DvEu4rOyadn/HdrVSRS990F7l/YgGfdA1CcRvYAjMz9aV wHHZTjIPCChFPSHSGiAfFkw1Iccmy8/79rxWARan6pv5ky+mTyx1ewz9DgEaQWe4NEQ9n8/2gls rHXU= X-Gm-Gg: ASbGncsQtafuBi/MjJMTOpeSNoptDYyNP0Ieb76RzgQTr52fYErhHMRCdX+TnI3AQYe Gw9lHwqcMZW8o70qTB3Kpbw/YDnPJ8Ya0yUQ3sgkwOP3zpQGkSCWvYov/4I6g0CThqMY7z84rQZ AEWnlbTRI+yUR8IHaJrFEtj+vC1MGUCbSnWPnPj1APHh5QgzBrf3jK366HEiWmIU+AFQl4XTFuv 9csGRyTOjvdbfuf0J6fSeH90pfhzh7a8kAUx2lE73q2ufypKIKN1iRMwtiTldgv82Wy4VJERhyx RrC2LziJRTdFpSHNRAFT5KMiNkwCx7ubKHo1kVVoYGRXu3kFPOU= X-Received: by 2002:a05:6a21:3405:b0:1f5:7710:fd18 with SMTP id adf61e73a8af0-20e9660883emr6877505637.17.1746409951002; Sun, 04 May 2025 18:52:31 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b1fb3920074sm4462101a12.11.2025.05.04.18.52.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 May 2025 18:52:30 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Paolo Bonzini , qemu-arm@nongnu.org, richard.henderson@linaro.org, alex.bennee@linaro.org, kvm@vger.kernel.org, Peter Maydell , anjo@rev.ng, =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= , Pierrick Bouvier Subject: [PATCH v5 04/48] meson: apply target config for picking files from libsystem and libuser Date: Sun, 4 May 2025 18:51:39 -0700 Message-ID: <20250505015223.3895275-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250505015223.3895275-1-pierrick.bouvier@linaro.org> References: <20250505015223.3895275-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x433.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 semihosting code needs to be included only if CONFIG_SEMIHOSTING is set. However, this is a target configuration, so we need to apply it to the libsystem libuser source sets. Signed-off-by: Pierrick Bouvier Acked-by: Richard Henderson --- meson.build | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/meson.build b/meson.build index b2c79a7a928..1b365dcae17 100644 --- a/meson.build +++ b/meson.build @@ -4049,27 +4049,19 @@ common_ss.add(qom, qemuutil) common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss]) common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) -libuser_ss = libuser_ss.apply({}) libuser = static_library('user', - libuser_ss.sources() + genh, + libuser_ss.all_sources() + genh, c_args: ['-DCONFIG_USER_ONLY', '-DCOMPILING_SYSTEM_VS_USER'], - dependencies: libuser_ss.dependencies(), + dependencies: libuser_ss.all_dependencies(), build_by_default: false) -libuser = declare_dependency(objects: libuser.extract_all_objects(recursive: false), - dependencies: libuser_ss.dependencies()) -common_ss.add(when: 'CONFIG_USER_ONLY', if_true: libuser) -libsystem_ss = libsystem_ss.apply({}) libsystem = static_library('system', - libsystem_ss.sources() + genh, + libsystem_ss.all_sources() + genh, c_args: ['-DCONFIG_SOFTMMU', '-DCOMPILING_SYSTEM_VS_USER'], - dependencies: libsystem_ss.dependencies(), + dependencies: libsystem_ss.all_dependencies(), build_by_default: false) -libsystem = declare_dependency(objects: libsystem.extract_all_objects(recursive: false), - dependencies: libsystem_ss.dependencies()) -common_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: libsystem) # Note that this library is never used directly (only through extract_objects) # and is not built by default; therefore, source files not used by the build @@ -4308,6 +4300,16 @@ foreach target : target_dirs target_common = common_ss.apply(config_target, strict: false) objects = [common_all.extract_objects(target_common.sources())] arch_deps += target_common.dependencies() + if target_type == 'system' + src = libsystem_ss.apply(config_target, strict: false) + objects += libsystem.extract_objects(src.sources()) + arch_deps += src.dependencies() + endif + if target_type == 'user' + src = libuser_ss.apply(config_target, strict: false) + objects += libuser.extract_objects(src.sources()) + arch_deps += src.dependencies() + endif if target_base_arch in target_common_arch_libs src = target_common_arch[target_base_arch].apply(config_target, strict: false) lib = target_common_arch_libs[target_base_arch]