From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
qemu-arm@nongnu.org, alex.bennee@linaro.org, kvm@vger.kernel.org,
"Peter Maydell" <peter.maydell@linaro.org>,
anjo@rev.ng, "Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v5 04/48] meson: apply target config for picking files from libsystem and libuser
Date: Mon, 5 May 2025 10:41:35 -0700 [thread overview]
Message-ID: <4e7c2d18-dec2-4a49-9f1c-35e057ba8874@linaro.org> (raw)
In-Reply-To: <857f0b9f-e58b-48a1-87af-49c3c52b379a@linaro.org>
On 5/5/25 9:59 AM, Richard Henderson wrote:
> On 5/4/25 18:51, Pierrick Bouvier wrote:
>> 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 <pierrick.bouvier@linaro.org>
>> ---
>> meson.build | 26 ++++++++++++++------------
>> 1 file changed, 14 insertions(+), 12 deletions(-)
>
> Acked-by: Richard Henderson <richard.henderson@linaro.org>
>
> I'm not quite sure how this is supposed to work. It appears this compiles everything in
> libsystem_ss, and then later selects whether the individual objects should be included in
> the link. This is fine for internal CONFIG like SEMIHOSTING, but won't be fine for a
> CONFIG that implies external dependencies like VNC.
>
The trick used in our build system is that static libraries are never
fully compiled (no archive is created), but everything is done by
extracting objects matching sources available after config. It's a bit
weird, but it works. I understand it was done this way to avoid creating
specific static libraries per QEMU target.
Before this patch libsystem was including all object files by default
(thus the link error with --disable-tcg in Philippe series), while now,
it selects them based on target config, so it's a subset.
In short: Static libraries in QEMU build system are just virtual sets of
files (sharing flags and dependencies), and only a subset is included in
each binary based on target config.
> I guess we can think about externals later, if it becomes an issue.
>
Most of our external dependencies are not set as required, so if no
object files selected uses it, it should link fine without the
dependency being present on linker command line.
>
> r~
>
next prev parent reply other threads:[~2025-05-05 17:43 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 1:51 [PATCH v5 00/48] single-binary: compile target/arm twice Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 01/48] target/arm: Replace target_ulong -> uint64_t for HWBreakpoint Pierrick Bouvier
2025-05-05 10:44 ` Philippe Mathieu-Daudé
2025-05-05 18:39 ` Pierrick Bouvier
2025-05-05 19:13 ` Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 02/48] include/system/hvf: missing vaddr include Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 03/48] meson: add common libs for target and target_system Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 04/48] meson: apply target config for picking files from libsystem and libuser Pierrick Bouvier
2025-05-05 16:59 ` Richard Henderson
2025-05-05 17:41 ` Pierrick Bouvier [this message]
2025-05-05 1:51 ` [PATCH v5 05/48] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 06/48] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 07/48] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 08/48] accel/hvf: add hvf_enabled() for common code Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 09/48] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 10/48] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 11/48] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 12/48] target/arm/cpu: compile file twice (user, system) only Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 13/48] target/arm/cpu32-stubs.c: compile file twice (user, system) Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 14/48] tcg: add vaddr type for helpers Pierrick Bouvier
2025-05-05 18:15 ` Richard Henderson
2025-05-05 1:51 ` [PATCH v5 15/48] target/arm/helper: use vaddr instead of target_ulong for exception_pc_alignment Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 16/48] target/arm/helper: use vaddr instead of target_ulong for probe_access Pierrick Bouvier
2025-05-05 18:16 ` Richard Henderson
2025-05-05 1:51 ` [PATCH v5 17/48] target/arm/helper: extract common helpers Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 18/48] target/arm/debug_helper: only include " Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 19/48] target/arm/debug_helper: remove target_ulong Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 20/48] target/arm/debug_helper: compile file twice (user, system) Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 21/48] target/arm/helper: restrict include to common helpers Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 22/48] target/arm/helper: replace target_ulong by vaddr Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 23/48] target/arm/helper: expose aarch64 cpu registration Pierrick Bouvier
2025-05-05 1:51 ` [PATCH v5 24/48] target/arm/helper: remove remaining TARGET_AARCH64 Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 25/48] target/arm/helper: compile file twice (user, system) Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 26/48] target/arm/vfp_fpscr: " Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 27/48] target/arm/arch_dump: remove TARGET_AARCH64 conditionals Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 28/48] target/arm/arch_dump: compile file once (system) Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 29/48] target/arm/arm-powerctl: " Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 30/48] target/arm/cortex-regs: " Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 31/48] target/arm/ptw: replace target_ulong with int64_t Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 32/48] target/arm/ptw: replace TARGET_AARCH64 by CONFIG_ATOMIC64 from arm_casq_ptw Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 33/48] target/arm/ptw: compile file once (system) Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 34/48] target/arm/meson: accelerator files are not needed in user mode Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 35/48] target/arm/kvm-stub: compile file once (system) Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 36/48] target/arm/machine: reduce migration include to avoid target specific definitions Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 37/48] target/arm/machine: remove TARGET_AARCH64 from migration state Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 38/48] target/arm/machine: move cpu_post_load kvm bits to kvm_arm_cpu_post_load function Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 39/48] target/arm/kvm-stub: add missing stubs Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 40/48] target/arm/machine: compile file once (system) Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 41/48] target/arm/tcg/crypto_helper: compile file twice (system, user) Pierrick Bouvier
2025-05-05 18:38 ` Richard Henderson
2025-05-05 18:47 ` Pierrick Bouvier
2025-05-05 18:51 ` Richard Henderson
2025-05-05 18:53 ` Pierrick Bouvier
2025-05-05 19:17 ` Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 42/48] target/arm/tcg/hflags: " Pierrick Bouvier
2025-05-05 18:41 ` Richard Henderson
2025-05-05 1:52 ` [PATCH v5 43/48] target/arm/tcg/iwmmxt_helper: " Pierrick Bouvier
2025-05-05 18:43 ` Richard Henderson
2025-05-05 18:51 ` Richard Henderson
2025-05-05 19:18 ` Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 44/48] target/arm/tcg/neon_helper: " Pierrick Bouvier
2025-05-05 18:44 ` Richard Henderson
2025-05-05 18:52 ` Richard Henderson
2025-05-05 19:21 ` Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 45/48] target/arm/tcg/tlb_helper: " Pierrick Bouvier
2025-05-05 18:45 ` Richard Henderson
2025-05-05 1:52 ` [PATCH v5 46/48] target/arm/tcg/tlb-insns: " Pierrick Bouvier
2025-05-05 18:49 ` Richard Henderson
2025-05-05 19:29 ` Pierrick Bouvier
2025-05-05 1:52 ` [PATCH v5 47/48] target/arm/tcg/arith_helper: " Pierrick Bouvier
2025-05-05 18:54 ` Richard Henderson
2025-05-05 19:33 ` Pierrick Bouvier
2025-05-05 19:37 ` Richard Henderson
2025-05-05 1:52 ` [PATCH v5 48/48] target/arm/tcg/vfp_helper: " Pierrick Bouvier
2025-05-05 18:57 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e7c2d18-dec2-4a49-9f1c-35e057ba8874@linaro.org \
--to=pierrick.bouvier@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=anjo@rev.ng \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).