From patchwork Fri May 16 05:27:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890605 Delivered-To: patch@linaro.org Received: by 2002:adf:e58d:0:b0:3a3:61c9:c5d4 with SMTP id l13csp81957wrm; Thu, 15 May 2025 22:28:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWnJQiAQE718ND10IDSUcEejuJhxutr+ataCVJ1qyo0zdYbUYByzLjCz5QrbGxyHAe4w4QzXQ==@linaro.org X-Google-Smtp-Source: AGHT+IHhnaSoARUy9P0l6BXvKzKC7wvbKFmF6vg/DhBJzBJZhr1r88NQr+gduXO/OZW63dl/6Ct+ X-Received: by 2002:a05:620a:1b8e:b0:7c5:3da2:fc75 with SMTP id af79cd13be357-7cd4672dc03mr296164985a.24.1747373281725; Thu, 15 May 2025 22:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747373281; cv=none; d=google.com; s=arc-20240605; b=dvX8oFUl98s+OIthnzoAPSUPSa0Yq3iI+k8DVFJR6he6TF1EkGmLwIlrflxk0ll6vc KT7i4raF1t7lGlpe0snd/KHacI8EdAkqHHU+/cVFMRHyas6yppEZgwdtksHgZTMjmDqn Urrl8J8+HJTf+rS6DzjrphPaxKpA1y08L1lUIREshm4oJJvO+VtLm40u3vMev7xWJVgc pOzxQp/fdpO5m0tVZWS9urNXkRwHvCbFS292mgW28vsVl5UuMJAV/T5XUdv7DSUQRi3P LX1R2/oQCSeZu+APHGJrlzdu6kHKZn7pb7BtiaqELP1KJbrS0m7YZvQKcEYMPAZaHai8 SsKQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=svLwGXDeWk3zFJeYjPP+l2YWYJd6pNP0E1Epsagupsg=; fh=a6UbtOiHwyJoMPV3UeNgHrbW2rQ4OdKN6ZJtoRFzk44=; b=FMR/DnpyRnFAyz1Xb9+IyPUwElqX3qkO9MQHh/19ft4hu3wv0HPRYgGlmnkW76xcjx 6xMCDmCdIodGCjynha+n/Icc89sMLz0hC4IsDy4eaprfQ+zRXXhiyeRmatIqORskejMe tnmMs3O5PhPWNfLjd3OTE5oOEdAzthr80bk/zHZzUmcXdzeDPGXs+eksAHVCEY8FIx6s YWb1WjoPbU7F6aosCnmFZGzTXNCsiguc33ESzS3MJxQloP1Lr+G17dWNpAXl42Rb0NM6 e7K8kEtadc1bZGR9j7BxNihXmLfdglq9ePKVWGgLqEGad/tB1U9Uj3W/DmWrB/HZyX6a sWzQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Szyqb0Vy; 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-7cd4688a41csi162442085a.321.2025.05.15.22.28.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 22:28:01 -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=Szyqb0Vy; 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 1uFnbN-0006Er-Pn; Fri, 16 May 2025 01:27:22 -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 1uFnbM-0006Bu-95 for qemu-devel@nongnu.org; Fri, 16 May 2025 01:27:20 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFnbK-0001MS-Iq for qemu-devel@nongnu.org; Fri, 16 May 2025 01:27:19 -0400 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-b07d607dc83so1494954a12.1 for ; Thu, 15 May 2025 22:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747373237; x=1747978037; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=svLwGXDeWk3zFJeYjPP+l2YWYJd6pNP0E1Epsagupsg=; b=Szyqb0VylrubyK+3rtudKhpjyZQbvRkUAT/9yWi4sWmsON4tOajXy/sRtqLqNGycp/ /O+ZJvDQUawZNbovw6avlqvSXtJ1UC885dt24GSViDDv4tngncw56RYxJLELtE9DEKy/ T//hhdMEWLgz7/DqkbIPCDYBhanyHIpqX+YU+n4mQZY98bfAlvl4L6U5ICkrNWGoduFI tvOFrSwX2XlAHWC/5/k1KlOg4XtwYCINtltSlf4kkY6rlXimEAiD+d54jLhqdEl/W9qm 01XfOu2CORj6N+iA2x16yoLJyJh9yMlBuLd6IeU4W2Pp93Vlbn8ZWm+A/eVWVaFqjc+u Iq1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747373237; x=1747978037; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=svLwGXDeWk3zFJeYjPP+l2YWYJd6pNP0E1Epsagupsg=; b=thVeAPYLIt8dGSWoM874sPUt4K04TgxSw+4b2lDn7uElix+vfvabfuaeKMQOMcm/If e6udLJVNMxSRRv+DqfcBn97o23sUvjzk/G8iEht/beSDNP8OJ38gG0j05+qi5Os3kHGR Uua/uRzsKnc3qEhlIN95EriQ7Ta9OJwgBpSDXXMRBmwqeaCEf+7HJEUlEgTc6f89XTsZ qLI7kGPDMX65y29wFi9TWoQQ4I0jRsYxyhiJhZm8PsI2q7vNoClz4CYJpdY+xNSKsG4h 1kImSTri4/9IFB2CkVH4ZynmCuuCRq9Kee2CpuZzPL1VDJUmHkaLjx9i7fKbY7rJz3HP wBRA== X-Gm-Message-State: AOJu0YzgnIxLAzDM08oUfPAYi2Bxc4jSQKATL3tZFsw/wp4dyxK6LclK kHpaW2o+J/VpryuPbIGThwpGWVmJWxUZUB1KKENmJJ88SiPUnPMtstwYLOR2uUhxm0BgTYj8TWG xyZQZ X-Gm-Gg: ASbGncu7mnAXyDaPDLGRFueLgi7si8erQlluHKnp+trxmj7k+OeDm3qzVqcqvGcx7qj KXSO9+DSjlWbKJouOerWXzfN/bGghgZDv81l0YltUV64mkg149TMPLjTtEC7sD8kRpEFXsM7Ago hDG/UneSOh8WG2BV/FeTO2knU5Ob0sMJrDKb88/5abJz0kvIVTYFkEnp9ZNii5dGE2xqTSrwp0n koZiGI8L2JPW4Ox4NbN5nHDu15wEat57/nrOR+Jbj19179u+66/ol6jN8XyqI+uSvhc2kl99bpt FuEwUqJLSjsudbumajXIBteZjlrkSjblTs0BSXgkVv7/668zVds= X-Received: by 2002:a17:903:11c3:b0:223:47b4:aaf8 with SMTP id d9443c01a7336-231d45eeeb0mr24243345ad.52.1747373236821; Thu, 15 May 2025 22:27:16 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ebabfesm6539135ad.174.2025.05.15.22.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 22:27:16 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , berrange@redhat.com, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , thuth@redhat.com, Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 0/6] single-binary: build target common libraries with dependencies Date: Thu, 15 May 2025 22:27:02 -0700 Message-ID: <20250516052708.930928-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pg1-x531.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 Recently, common libraries per target base architecture were introduced in order to compile those files only once. However, it was missing common dependencies (which include external libraries), so it failed to build on some hosts. This series fixes this, inspired by Thomas fix [1], and applied to other libraries introduced very recently with [2]. As well, we do further cleanup by removing lib{system, user} source sets that were recently introduced, by merging them in system/user libraries, thus simplifying the work on single-binary. This series was built on {linux, macos, windows} x {x86_64, aarch64} and freebsd on x86_64. Fully tested on linux x {x86_64, aarch64}. In addition to that, it was checked that compilation units compiled per binary stayed the same, and that their size was identical. [1] https://lore.kernel.org/qemu-devel/20250513115637.184940-1-thuth@redhat.com/ [2] https://gitlab.com/qemu-project/qemu/-/commit/b2bb3f3576e5dc99218607dde09e25ac0e55693c Pierrick Bouvier (6): meson: build target libraries with common dependencies hw/arm: remove explicit dependencies listed target/arm: remove explicit dependencies listed meson: apply target config for picking files from lib{system, user} meson: merge lib{system, user}_ss with {system, user}_ss. meson: remove lib{system, user}_ss aliases meson.build | 65 +++++++++++++++++++++++++++--------------- accel/tcg/meson.build | 8 +++--- gdbstub/meson.build | 4 +-- hw/arm/meson.build | 4 +-- hw/core/meson.build | 4 +-- plugins/meson.build | 4 +-- system/meson.build | 2 +- target/arm/meson.build | 2 +- tcg/meson.build | 4 +-- 9 files changed, 58 insertions(+), 39 deletions(-) Tested-by: Thomas Huth