mbox series

[v2,0/7] single-binary: build target common libraries with dependencies

Message ID 20250521223414.248276-1-pierrick.bouvier@linaro.org
Headers show
Series single-binary: build target common libraries with dependencies | expand

Message

Pierrick Bouvier May 21, 2025, 10:34 p.m. UTC
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

v2
--

- Additional patch to merge hw_common_arch_libs in
  target_common_system_arch libs (Paolo)
- Better commit description for merging lib{system, user}_ss with
  {system, user}_ss (Paolo)

Pierrick Bouvier (7):
  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: merge hw_common_arch in target_common_system_arch

 meson.build            | 124 +++++++++++++++++++++--------------------
 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, 80 insertions(+), 76 deletions(-)

Comments

Philippe Mathieu-Daudé May 26, 2025, 9:53 a.m. UTC | #1
On 22/5/25 00:34, Pierrick Bouvier wrote:

> Pierrick Bouvier (7):
>    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: merge hw_common_arch in target_common_system_arch

Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Paolo Bonzini May 26, 2025, 4:04 p.m. UTC | #2
Queued, thanks.

Paolo
Pierrick Bouvier May 27, 2025, 5:15 p.m. UTC | #3
On 5/26/25 2:53 AM, Philippe Mathieu-Daudé wrote:
> On 22/5/25 00:34, Pierrick Bouvier wrote:
> 
>> Pierrick Bouvier (7):
>>     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: merge hw_common_arch in target_common_system_arch
> 
> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 

Thanks to you and Thomas for raising the issues this series fixed:
- dependencies for target common libraries
- apply config for target common libraries
We should be good and complete in terms of build system for the single 
binary now.
(last step left will be to create the single binary itself, which I have 
a patch for, but it will come later, no need to worry people with a new 
mysterious binary :)).

Pierrick