[PATCH] target/s390x: add gen-features.h dependency to s390x_system_ss

marcandre.lureau@redhat.com posted 1 patch 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260510204640.2178926-1-marcandre.lureau@redhat.com
Maintainers: Cornelia Huck <cohuck@redhat.com>, Eric Farman <farman@linux.ibm.com>, Matthew Rosato <mjrosato@linux.ibm.com>, Richard Henderson <richard.henderson@linaro.org>, Ilya Leoshkevich <iii@linux.ibm.com>, David Hildenbrand <david@kernel.org>
target/s390x/meson.build | 1 +
1 file changed, 1 insertion(+)
[PATCH] target/s390x: add gen-features.h dependency to s390x_system_ss
Posted by marcandre.lureau@redhat.com 2 weeks ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Commit 0b83acf2f05 moved gen_features_h from s390x_ss to
s390x_common_ss. However s390x_system_ss (containing ioinst.c) was left
without the dependency, causing a build race: it can be compiled before
gen-features.h is generated (via cpu.h -> cpu_models.h -> cpu_features.h
-> gen-features.h)

Add gen_features_h to s390x_system_ss to correct the build ordering.

Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson source set")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 target/s390x/meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/s390x/meson.build b/target/s390x/meson.build
index 44f58ac2919..bc4459e8ed7 100644
--- a/target/s390x/meson.build
+++ b/target/s390x/meson.build
@@ -26,6 +26,7 @@ s390x_common_ss.add(files(
   'gdbstub.c',
 ))
 
+s390x_system_ss.add(gen_features_h)
 s390x_system_ss.add(files(
   'ioinst.c',
 ))
-- 
2.54.0


Re: [PATCH] target/s390x: add gen-features.h dependency to s390x_system_ss
Posted by Eric Farman 2 weeks ago
On Mon, 2026-05-11 at 00:46 +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 0b83acf2f05 moved gen_features_h from s390x_ss to
> s390x_common_ss. However s390x_system_ss (containing ioinst.c) was left
> without the dependency, causing a build race: it can be compiled before
> gen-features.h is generated (via cpu.h -> cpu_models.h -> cpu_features.h
> -> gen-features.h)
> 
> Add gen_features_h to s390x_system_ss to correct the build ordering.
> 
> Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson source set")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  target/s390x/meson.build | 1 +
>  1 file changed, 1 insertion(+)

Hardly an expert on meson, but seems correct to my brain. Thank you!

Acked-by: Eric Farman <farman@linux.ibm.com>

> 
> diff --git a/target/s390x/meson.build b/target/s390x/meson.build
> index 44f58ac2919..bc4459e8ed7 100644
> --- a/target/s390x/meson.build
> +++ b/target/s390x/meson.build
> @@ -26,6 +26,7 @@ s390x_common_ss.add(files(
>    'gdbstub.c',
>  ))
>  
> +s390x_system_ss.add(gen_features_h)
>  s390x_system_ss.add(files(
>    'ioinst.c',
>  ))
Re: [PATCH] target/s390x: add gen-features.h dependency to s390x_system_ss
Posted by Ilya Leoshkevich 2 weeks ago

On 5/10/26 22:46, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 0b83acf2f05 moved gen_features_h from s390x_ss to
> s390x_common_ss. However s390x_system_ss (containing ioinst.c) was left
> without the dependency, causing a build race: it can be compiled before
> gen-features.h is generated (via cpu.h -> cpu_models.h -> cpu_features.h
> -> gen-features.h)
> 
> Add gen_features_h to s390x_system_ss to correct the build ordering.
> 
> Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson source set")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   target/s390x/meson.build | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/s390x/meson.build b/target/s390x/meson.build
> index 44f58ac2919..bc4459e8ed7 100644
> --- a/target/s390x/meson.build
> +++ b/target/s390x/meson.build
> @@ -26,6 +26,7 @@ s390x_common_ss.add(files(
>     'gdbstub.c',
>   ))
>   
> +s390x_system_ss.add(gen_features_h)
>   s390x_system_ss.add(files(
>     'ioinst.c',
>   ))

The patch makes sense, but somehow I cannot reproduce the issue.
I would expect the following to do the trick:

$ make clean
$ make libqemu-s390x-softmmu.a.p/target_s390x_ioinst.c.o -j24

because if there is no dependency, then the header file will not be
generated and compiler will fail, but this actually succeeds.

Re: [PATCH] target/s390x: add gen-features.h dependency to s390x_system_ss
Posted by Philippe Mathieu-Daudé 2 weeks ago
On 10/5/26 22:46, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> Commit 0b83acf2f05 moved gen_features_h from s390x_ss to
> s390x_common_ss. However s390x_system_ss (containing ioinst.c) was left
> without the dependency, causing a build race: it can be compiled before
> gen-features.h is generated (via cpu.h -> cpu_models.h -> cpu_features.h
> -> gen-features.h)
> 
> Add gen_features_h to s390x_system_ss to correct the build ordering.
> 
> Fixes: 0b83acf2f05 ("target/s390x: Introduce common system/user meson source set")
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   target/s390x/meson.build | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>