The meson conversion dropped the SLOF libc include path that commit
3fa010d5317 ("tests/tcg/s390x: Use the SLOF libc headers for the
multiarch tests") had added, breaking the build on systems without a
cross-libc, such as Fedora.

Restore the include path. Add the logic to check out SLOF libc.

Reported-by: Daniel P. BerrangĂ© <[email protected]>
Reported-by: Alex BennĂ©e <[email protected]>
Closes: https://patchew.org/QEMU/[email protected]/
Fixes: cd81cf86834 ("tests/tcg/s390x: system tests")
Signed-off-by: Ilya Leoshkevich <[email protected]>
---
 tests/tcg/s390x/system/meson.build | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/tcg/s390x/system/meson.build 
b/tests/tcg/s390x/system/meson.build
index ca07f503058..26f47d4184a 100644
--- a/tests/tcg/s390x/system/meson.build
+++ b/tests/tcg/s390x/system/meson.build
@@ -6,11 +6,13 @@ link_script = files('../softmmu.ld')[0]
 head64 = files('../head64.S')[0]
 console = files('../console.c')[0]
 ipl_inc = meson.project_source_root()/'include'/'hw'/'s390x'/'ipl'
+slof_inc = meson.project_source_root()/'roms'/'SLOF'/'lib'/'libc'/'include'
 cflags = ['-nostdlib',
           '-ffreestanding',
           '-Wa,--noexecstack',
           '-I', minilib_dir, minilib_printf,
           '-I', ipl_inc,
+          '-I', slof_inc,
           '-march=z13',
           head64, console]
 asmflags = ['-nostdlib',
@@ -21,6 +23,11 @@ qemu_args = ['-display', 'none',
              '-serial', 'stdio',
              '-kernel']
 
+if not fs.exists(slof_inc) and get_option('wrap_mode') != 'nodownload'
+  run_command(meson.project_source_root()/'scripts'/'git-submodule.sh',
+              'update', 'roms/SLOF', check: false)
+endif
+
 # Multi arch tests - add cflags only once per src
 multi_src = []
 foreach t: tcg_tests['multiarch-softmmu']['tests']
-- 
2.55.0


Reply via email to