qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	berrange@redhat.com, "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	thuth@redhat.com, "Peter Maydell" <peter.maydell@linaro.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 5/6] meson: merge lib{system, user}_ss with {system, user}_ss.
Date: Sat, 17 May 2025 12:34:23 -0700	[thread overview]
Message-ID: <90aa40b9-6f6f-48f7-8c17-5f5bb74e4191@linaro.org> (raw)
In-Reply-To: <6f741951-c322-4b0a-8723-a354d6547c84@redhat.com>

On 5/17/25 8:04 AM, Paolo Bonzini wrote:
> On 5/16/25 07:27, Pierrick Bouvier wrote:
>> Now that target configuration can be applied to lib{system, user}_ss,
>> there is no reason to keep that separate from the existing {system,
>> user}_ss.
> 
> The reason would be that previously you wouldn't have
> -DCOMPILING_SYSTEM_VS_USER defined for the files in system_ss/user_ss.
> I don't think it's a problem, because it's usually clear if a file is
> common QEMU infrastructure or specific to system emulation; but it's
> worth mentioning it in the commit message.
>

Yes, sure, I'll add it.
Indeed, it's not changing much, just unpoisoining CONFIG_USER_ONLY and 
CONFIG_SOFTMMU.
The only difference this change make is that existing system/user files 
now can eventually use those defines, which should be harmless as they 
were not using them before.

> Paolo
> 
>>                             c_args: ['-DCONFIG_USER_ONLY',
>>                                      '-DCOMPILING_SYSTEM_VS_USER'],
>> -                         dependencies: libuser_ss.all_dependencies(),
>> +                         include_directories: common_user_inc,
>> +                         dependencies: user_ss.all_dependencies(),
>>                             build_by_default: false)
>>    
>>    libsystem = static_library('system',
>> -                           libsystem_ss.all_sources() + genh,
>> +                           system_ss.all_sources() + genh,
>>                               c_args: ['-DCONFIG_SOFTMMU',
>>                                        '-DCOMPILING_SYSTEM_VS_USER'],
>> -                           dependencies: libsystem_ss.all_dependencies(),
>> +                           dependencies: system_ss.all_dependencies(),
>>                               build_by_default: false)
>>    
>>    # Note that this library is never used directly (only through extract_objects)
>> @@ -4121,7 +4119,6 @@ libsystem = static_library('system',
>>    common_all = static_library('common',
>>                                build_by_default: false,
>>                                sources: common_ss.all_sources() + genh,
>> -                            include_directories: common_user_inc,
>>                                implicit_include_directories: false,
>>                                dependencies: common_ss.all_dependencies())
>>    
>> @@ -4135,10 +4132,20 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
>>      inc = [common_user_inc + target_inc]
>>    
>>      target_common = common_ss.apply(config_target, strict: false)
>> +  target_system = system_ss.apply(config_target, strict: false)
>> +  target_user = user_ss.apply(config_target, strict: false)
>>      common_deps = []
>> +  system_deps = []
>> +  user_deps = []
>>      foreach dep: target_common.dependencies()
>>        common_deps += dep.partial_dependency(compile_args: true, includes: true)
>>      endforeach
>> +  foreach dep: target_system.dependencies()
>> +    system_deps += dep.partial_dependency(compile_args: true, includes: true)
>> +  endforeach
>> +  foreach dep: target_user.dependencies()
>> +    user_deps += dep.partial_dependency(compile_args: true, includes: true)
>> +  endforeach
>>    
>>      # prevent common code to access cpu compile time definition,
>>      # but still allow access to cpu.h
>> @@ -4154,7 +4161,7 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
>>            sources: src.all_sources() + genh,
>>            include_directories: inc,
>>            c_args: target_system_c_args,
>> -        dependencies: src.all_dependencies() + common_deps)
>> +        dependencies: src.all_dependencies() + common_deps + system_deps)
>>          hw_common_arch_libs += {target_base_arch: lib}
>>        endif
>>      endif
>> @@ -4168,7 +4175,8 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
>>            sources: src.all_sources() + genh,
>>            include_directories: inc,
>>            c_args: target_c_args,
>> -        dependencies: src.all_dependencies() + common_deps)
>> +        dependencies: src.all_dependencies() + common_deps +
>> +                      system_deps + user_deps)
>>          target_common_arch_libs += {target_base_arch: lib}
>>        endif
>>      endif
>> @@ -4182,7 +4190,7 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak
>>            sources: src.all_sources() + genh,
>>            include_directories: inc,
>>            c_args: target_system_c_args,
>> -        dependencies: src.all_dependencies() + common_deps)
>> +        dependencies: src.all_dependencies() + common_deps + system_deps)
>>          target_common_system_arch_libs += {target_base_arch: lib}
>>        endif
>>      endif
>> @@ -4358,12 +4366,12 @@ foreach target : target_dirs
>>      objects = [common_all.extract_objects(target_common.sources())]
>>      arch_deps += target_common.dependencies()
>>      if target_type == 'system'
>> -    src = libsystem_ss.apply(config_target, strict: false)
>> +    src = system_ss.apply(config_target, strict: false)
>>        objects += libsystem.extract_objects(src.sources())
>>        arch_deps += src.dependencies()
>>      endif
>>      if target_type == 'user'
>> -    src = libuser_ss.apply(config_target, strict: false)
>> +    src = user_ss.apply(config_target, strict: false)
>>        objects += libuser.extract_objects(src.sources())
>>        arch_deps += src.dependencies()
>>      endif
> 



  reply	other threads:[~2025-05-17 19:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-16  5:27 [PATCH 0/6] single-binary: build target common libraries with dependencies Pierrick Bouvier
2025-05-16  5:27 ` [PATCH 1/6] meson: build target libraries with common dependencies Pierrick Bouvier
2025-05-16 11:42   ` Philippe Mathieu-Daudé
2025-05-16 14:34     ` Pierrick Bouvier
2025-05-17 15:00   ` Paolo Bonzini
2025-05-17 19:37     ` Pierrick Bouvier
2025-05-16  5:27 ` [PATCH 2/6] hw/arm: remove explicit dependencies listed Pierrick Bouvier
2025-05-16  5:27 ` [PATCH 3/6] target/arm: " Pierrick Bouvier
2025-05-16  5:27 ` [PATCH 4/6] meson: apply target config for picking files from lib{system, user} Pierrick Bouvier
2025-05-16  5:27 ` [PATCH 5/6] meson: merge lib{system, user}_ss with {system, user}_ss Pierrick Bouvier
2025-05-17 15:04   ` Paolo Bonzini
2025-05-17 19:34     ` Pierrick Bouvier [this message]
2025-05-16  5:27 ` [PATCH 6/6] meson: remove lib{system, user}_ss aliases Pierrick Bouvier
2025-05-16  5:40 ` [PATCH 0/6] single-binary: build target common libraries with dependencies Pierrick Bouvier
2025-05-16  7:24 ` Thomas Huth
2025-05-21 22:38 ` Pierrick Bouvier

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=90aa40b9-6f6f-48f7-8c17-5f5bb74e4191@linaro.org \
    --to=pierrick.bouvier@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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).