[PATCH 2/2] hw/loongarch/fw_cfg: Build in common_ss[]

Philippe Mathieu-Daudé posted 2 patches 1 month, 3 weeks ago
[PATCH 2/2] hw/loongarch/fw_cfg: Build in common_ss[]
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
Nothing in LoongArch fw_cfg.c requires target specific definitions.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/loongarch/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/loongarch/meson.build b/hw/loongarch/meson.build
index bce7ebac97..005f017e21 100644
--- a/hw/loongarch/meson.build
+++ b/hw/loongarch/meson.build
@@ -1,8 +1,8 @@
 loongarch_ss = ss.source_set()
 loongarch_ss.add(files(
-    'fw_cfg.c',
     'boot.c',
 ))
+common_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('fw_cfg.c'))
 loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('virt.c'))
 loongarch_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-build.c'))
 
-- 
2.45.2


Re: [PATCH 2/2] hw/loongarch/fw_cfg: Build in common_ss[]
Posted by Thomas Huth 1 month, 3 weeks ago
On 27/09/2024 23.32, Philippe Mathieu-Daudé wrote:
> Nothing in LoongArch fw_cfg.c requires target specific definitions.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/loongarch/meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/loongarch/meson.build b/hw/loongarch/meson.build
> index bce7ebac97..005f017e21 100644
> --- a/hw/loongarch/meson.build
> +++ b/hw/loongarch/meson.build
> @@ -1,8 +1,8 @@
>   loongarch_ss = ss.source_set()
>   loongarch_ss.add(files(
> -    'fw_cfg.c',
>       'boot.c',
>   ))
> +common_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('fw_cfg.c'))
>   loongarch_ss.add(when: 'CONFIG_LOONGARCH_VIRT', if_true: files('virt.c'))
>   loongarch_ss.add(when: 'CONFIG_ACPI', if_true: files('acpi-build.c'))
>   

Reviewed-by: Thomas Huth <thuth@redhat.com>