tests/tcg/s390x: Provide the libc bits needed by the system tests
PATCH v2 1/1 tests/tcg/s390x: Provide the libc bits needed by the system tests
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.
Rather than reintroducing a dependency on the SLOF submodule, which no other tcg test has, declare the three functions that the reused pc-bios code actually needs: memcpy(), memset(), and printf().
---
v1: https://lore.kernel.org/qemu-devel/[email protected]/
v1 -> v2: Drop the SLOF dependency (Pierrick)
tests/tcg/s390x/libc/stdio.h | 11 +++++++++++ tests/tcg/s390x/libc/string.h | 12 ++++++++++++ tests/tcg/s390x/system/meson.build | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/libc/stdio.h create mode 100644 tests/tcg/s390x/libc/string.h
tests/tcg/s390x/libc/stdio.h new file +11 -0
@@ -0,0 +1,11 @@ +/* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ +#ifndef QEMU_TESTS_S390X_STDIO_H +#define QEMU_TESTS_S390X_STDIO_H + +#include <minilib.h> + +#define printf ml_printf + +#endif
tests/tcg/s390x/libc/string.h new file +12 -0
@@ -0,0 +1,12 @@ +/* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ +#ifndef QEMU_TESTS_S390X_STRING_H +#define QEMU_TESTS_S390X_STRING_H + +#include <stddef.h> + +void *memcpy (void *dest,const void *src,size_t n); +void *memset (void *dest,int c,size_t size); + +#endif
tests/tcg/s390x/system/meson.build +2 -0
@@ -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' +libc_inc = meson.current_source_dir()/'..'/'libc' cflags = ['-nostdlib', '-ffreestanding', '-Wa,--noexecstack', '-I', minilib_dir, minilib_printf, '-I', ipl_inc, + '-I', libc_inc, '-march=z13', head64, console] asmflags = ['-nostdlib',
Signature · 1 line
2.55.0
Quoted 20 lines · Ilya Leoshkevich
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.Rather than reintroducing a dependency on the SLOF submodule, which no other tcg test has, declare the three functions that the reused pc-bios code actually needs:
memcpy(),memset(), andprintf().Reported-by Daniel P. Berrangé <[email protected]>Reported-by Alex Bennée <[email protected]>Suggested-by Pierrick Bouvier <[email protected]>Fixes cd81cf86834 ("tests/tcg/s390x: system tests")Signed-off-by Ilya Leoshkevich <[email protected]>---
v1: https://lore.kernel.org/qemu-devel/[email protected]/
v1 -> v2: Drop the SLOF dependency (Pierrick)
Quoted 7 lines
tests/tcg/s390x/libc/stdio.h | 11 +++++++++++ tests/tcg/s390x/libc/string.h | 12 ++++++++++++ tests/tcg/s390x/system/meson.build | 2 ++ 3 files changed, 25 insertions(+) create mode 100644 tests/tcg/s390x/libc/stdio.h create mode 100644 tests/tcg/s390x/libc/string.h
Quoted 9 lines · Ilya Leoshkevich
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.Rather than reintroducing a dependency on the SLOF submodule, which no other tcg test has, declare the three functions that the reused pc-bios code actually needs:
memcpy(),memset(), andprintf().
Quoted 6 lines
Reported-by Daniel P. Berrangé <[email protected]>Reported-by Alex Bennée <[email protected]>Suggested-by Pierrick Bouvier <[email protected]>Fixes cd81cf86834 ("tests/tcg/s390x: system tests")Signed-off-by Ilya Leoshkevich <[email protected]>
Queued to testing/next, thanks.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro