From patchwork Wed Mar 5 15:39:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 870567 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:178f:b0:38f:210b:807b with SMTP id e15csp850081wrg; Wed, 5 Mar 2025 07:42:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUBBiw5kRm3hYQ7pG0Rj8rYoul/j3bfENRnZ5IMiPuJk8K3zr7AP834QbT4odTsux7VR5HG7g==@linaro.org X-Google-Smtp-Source: AGHT+IFT9+mP+63uPElwivGZooOf3g8uCPuLEuHochFftwsQIojy4rTiGq2xqVRTv0tv86lhz4gp X-Received: by 2002:a05:6214:c8c:b0:6e8:9526:5788 with SMTP id 6a1803df08f44-6e8e6c8cc8emr45139616d6.0.1741189369163; Wed, 05 Mar 2025 07:42:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1741189369; cv=none; d=google.com; s=arc-20240605; b=O9d5nM6YQJTuN5Sipav+RSx1dx0Cmk0EdV0UPIFFBVr8ZYJp/lrswYnh1PkZWZaPY5 T5mZ3RNxI4lswRWMaH/3EDBMD+P42Ouq+3cJaRcH9ZAYPHUOTVbyQ4yavYt0hB/3uQe7 Ei88dZC1tA1ZNSm51JPxKnhv6jDe+K4qMqOOPQQnH5TfZ1jxapln7SoDG8AcZsFYb/yI sq8V2duzSIET/MufnM0NYK/K8jqCumLEPqTHz2Kn3NXBmXZgkL+pEKUrZzKtEEZRwlpo loeorWLZfT/cwRFNtieAPBRYijLtYSW3WUSFmtsrY+N0hmupfbKRtsAj0K9K8xzapT7t 7TEg== 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=SAe89AKUiv2OCh4O9g61YeTeEn2jUwLCWPqWxHhFQsc=; fh=iYS+U9AiAK/hVpJiag4U+eV/XPHIFc9y9I+tcL8yyYE=; b=a/C5nHKsTKsN4KdkUeUhV0NLmcQ9Ese4CNtSWY7CkVz0/CBzZme5BXCf0tOXmtVW2Q 1RMimmh0BzeoH9F8U0LpRpAe+zM+KUjB6SsNSxsGb4qGoDfx3kuy/zsiH1C7OUNJ58xR DZqPc6yOwO3o8meRYYKg3o4hPGLRIgm75J37lagXfBsBlVh/vcDz0CxOYmjimHi+SRQK e/tVSVnnTaSgjAwGzs7fjaKyqG5KKrAWWgSmtJhqy1DYhzdhs1rzoUg2bAMZiuVtcOJ+ ZMFx8cRAk6ixBUXtlW9QR582hpg3ePB+49u5dHJNjqDUuENld9RqLW3RB/+GukgszmcE wbOg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uOrrI5kE; 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 6a1803df08f44-6e897701327si126891266d6.455.2025.03.05.07.42.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Mar 2025 07:42:49 -0800 (PST) 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=uOrrI5kE; 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 1tpqro-0001FK-Un; Wed, 05 Mar 2025 10:41:05 -0500 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 1tpqrg-0000wH-Kn for qemu-devel@nongnu.org; Wed, 05 Mar 2025 10:40:58 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tpqre-0002dd-M6 for qemu-devel@nongnu.org; Wed, 05 Mar 2025 10:40:56 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-38dcac27bcbso689623f8f.0 for ; Wed, 05 Mar 2025 07:40:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741189253; x=1741794053; 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=SAe89AKUiv2OCh4O9g61YeTeEn2jUwLCWPqWxHhFQsc=; b=uOrrI5kECw3Wm8T2q5n91gWwkzWdyDjyhQNLEp9ewsm7O+/k4lkmq71+5O2W/gtAsi tyY8EQBQo/LJ/bJJ/YCc7cbldn4ED/2wX05dFYQI2Cf9WYVmbX3beowP2JUs2xfvXMBs nIcDksmkdofqNvLL12wyeRbxlNkjPbZkaRbHgtFNBs1xVouET4hjtr1DY2B2vA+xFPM4 6UbJYXvKJc04o4YRbbA4lsp+cLfS1sGfJABulUuGC/H+p7ubvjQwwxSHHzt0mfUn7eOQ tTv44ZkjGa5xFGN6yVMooWMkx/dAafDlPrCESMsctL9Gr/h3XAPQbVj4l3npAKD4fgZS oreg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741189253; x=1741794053; 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=SAe89AKUiv2OCh4O9g61YeTeEn2jUwLCWPqWxHhFQsc=; b=SgBlc4KiIR+28ugJrIY5U4K9Hd6by5H9ImraeAgAmZE57d1TN462GKWbBRtgWgpWIl aRelrSzEgh3ge9rfA2aWpazkSPQDHfpmwf5gcH8U01EOtJ7g0q07TxjmYF+2QYK3007A FnnfJltykTCPseGN1Ve7gq6ONO/2oExZ1xhWaFeOlgsrE1wKYllN+xqpJ+EKFf2e5/C1 H6Z2N+iBdKMiwMrUbJIEixbKRdO7YaXEofeJxIUIX01LYNIyLcSeCCBrCA/NttcXdg8q uONB5ZaM8PaFN5Il9KSQ5uQMlJBUgbSZUpV36H25vM9cdMAWKgVqMNyA0Zv6BXkeKYnu zDBg== X-Gm-Message-State: AOJu0YzW8zhnyMepl2t3pK5tsOXcI9w8c28e+/VemktzgyNRc0HPJHkI Qr6b9mosB9nCJRJvdJeMH6fVpFKa9nXpmMbpoFQLd+7R41aWC45k+8e4yv9DGYuvz+wXi0zKtSh z+0Y= X-Gm-Gg: ASbGncsKEpoP+Gsq8GOYgaRE7V3Y6DbHZ1oiuwW+9e+VYNPKeqy7ZTWcipiROBnq3HR kPQz7vk4dY9mjdgxVclf9mdY+NkJlZ15gzmq8+mAeePxh1WXtja1ETNPOFEA1J/uQ4RZ3wFPhAF zfjYouwOxcOqf/AlGJuUuqd//3e4VEmBghYDXkBhQGPvcmxtTooip8xrIxCKHi0pftVQN7d2iiY R0pK6ZcLLHa/q/9j6c7InuyXH5WVaVROybamcd9hOqnzNKqaaPVLzOSd/PV81xcM4s5oQZMf4JQ nm7V7W3BAwpZIhuq8ldTd8wXNGM2TbM0XWcCck64Dwx59lRPpBeViGFUNPIthRfI6WlHgYecHXX 3zNe26RMVnN3S+aB0N9g= X-Received: by 2002:a5d:6c62:0:b0:390:e9ee:f27a with SMTP id ffacd0b85a97d-3911ea54ab8mr2711232f8f.28.1741189252778; Wed, 05 Mar 2025 07:40:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e47a7473sm21707201f8f.38.2025.03.05.07.40.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Mar 2025 07:40:52 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Richard Henderson , Pierrick Bouvier , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [RFC PATCH 17/18] meson: Allow symlinking system emulation binaries Date: Wed, 5 Mar 2025 16:39:27 +0100 Message-ID: <20250305153929.43687-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250305153929.43687-1-philmd@linaro.org> References: <20250305153929.43687-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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 The 'legacy binary' API allows checking target specific features at runtime by comparing the argv[0] binary name. Add few lines to easily symlink indentical targets (see next commit). Signed-off-by: Philippe Mathieu-Daudé --- This is ugly meson, but the point is to show a prototype. One problem is we can not run 'make check-$suite-$target' anymore :( --- meson.build | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/meson.build b/meson.build index e4ede6ba06f..c2b7ec57739 100644 --- a/meson.build +++ b/meson.build @@ -3251,6 +3251,9 @@ host_kconfig = \ ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ] +aliased_targets = [] +aliased_target = {} + default_targets = 'CONFIG_DEFAULT_TARGETS' in config_host actual_target_dirs = [] fdt_required = [] @@ -3273,6 +3276,9 @@ foreach target : target_dirs endif config_target += { 'CONFIG_BSD_USER': 'y' } elif target.endswith('softmmu') + if config_target['TARGET_NAME'] in aliased_targets + continue + endif config_target += { 'CONFIG_SYSTEM_ONLY': 'y' } config_target += { 'CONFIG_SOFTMMU': 'y' } endif @@ -4307,6 +4313,16 @@ foreach target : target_dirs link_args: link_args, win_subsystem: exe['win_subsystem']) + if target_name in aliased_target + exe_alias = 'qemu-system-' + aliased_target[target_name] + emulators += {exe_alias : custom_target(exe_alias, + input: [emulator], + output: exe_alias, + command: ['ln', '-f', '@INPUT@', '@OUTPUT@'], + install : true, + install_dir : get_option('bindir'))} + endif + if host_os == 'darwin' icon = 'pc-bios/qemu.rsrc' build_input = [emulator, files(icon)]