[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is the correct way to add linker dependency to QEMU build syste
From: |
Peter Maydell |
Subject: |
Re: What is the correct way to add linker dependency to QEMU build system? |
Date: |
Thu, 29 Feb 2024 17:34:22 +0000 |
On Thu, 29 Feb 2024 at 16:10, Paz Offer <poffer@nvidia.com> wrote:
> I want to add library 'libdl' to be linked with QEMU build for a particular
> target (e.g. - qemu-system-arm).
> Using meson I would typically do 'compiler.find_library(...)', and later add
> the returned dependency to the binary dependencies list.
> However, in QEMU I understand that these configurations are done in the
> './configure' file?
>
> What would be the correct way to do this?
If you can do the job using the glib g_module_open()/
g_module_symbol() functions (which is how QEMU itself does
loading of plugin and module DLLs, and which on Unix hosts
are pretty much wrappers around dlopen/dlsym) then you
don't need to link against libdl at all.
If this is for something you're planning to upstream
then it might be worth talking at a higher level about
what you're aiming to do. (If it's for something downstream
that you don't plan to ever upstream then you can do
whatever's easiest for you, of course.)
-- PMM