On Wed, Oct 28, 2020 at 4:39 AM Stefan Hajnoczi <stefa...@redhat.com> wrote: > > On Tue, Oct 27, 2020 at 08:06:57PM -0700, Joelle van Dyne wrote: > > This introduces support for building for iOS hosts. When the correct Xcode > > toolchain is used, iOS host will be detected automatically. > > > > block: disable features not supported by iOS sandbox > > slirp: disable SMB features for iOS > > target: disable system() calls for iOS > > tcg: use sys_icache_invalidate() instead of GCC builtin for iOS > > tests: disable tests on iOS which uses system() > > Signed-off-by: Joelle van Dyne <j...@getutm.app> > > --- > > configure | 43 +++++++++++++++++++++++++++++++++- > > meson.build | 2 +- > > tcg/aarch64/tcg-target.h | 7 ++++++ > > block.c | 2 +- > > block/file-posix.c | 31 ++++++++++++++---------- > > net/slirp.c | 16 ++++++------- > > qga/commands-posix.c | 6 +++++ > > target/arm/arm-semi.c | 2 ++ > > target/m68k/m68k-semi.c | 2 ++ > > target/nios2/nios2-semi.c | 2 ++ > > tests/qtest/libqos/virtio-9p.c | 8 +++++++ > > tests/qtest/meson.build | 7 +++--- > > 12 files changed, 101 insertions(+), 27 deletions(-) > > Please add a ./MAINTAINERS file entry for iOS host support. > > Maintainership duties involve: > 1. Respond to emails and review patches for their subsystem. > 2. Send pull requests with the patches they have merged. > 3. Participate in keeping their subsystem functional, e.g. ensuring CI > coverage and testing is working. > > These are not strictly defined, people do them in different ways. Will do.
> > It is beneficial to get continuous integration working for iOS. > Otherwise other maintainers may merge patches that break iOS compilation > and you'll find out later and be left solving the issues. If we want to do this it may come in another patch set. Reason is that to build QEMU for iOS, you have to build all the dependencies as well, which means downloading and building tar.gz from various sources for specific versions. We run a CI for UTM that uses this script to build QEMU, as you can see it's rather involved: https://github.com/utmapp/UTM/blob/master/scripts/build_dependencies.sh > > > diff --git a/target/nios2/nios2-semi.c b/target/nios2/nios2-semi.c > > index d7a80dd303..bb029070d3 100644 > > --- a/target/nios2/nios2-semi.c > > +++ b/target/nios2/nios2-semi.c > > @@ -426,6 +426,7 @@ void do_nios2_semihosting(CPUNios2State *env) > > result = isatty(arg0); > > } > > break; > > +#if !defined(CONFIG_IOS) /* iOS does not have system() */ > > case HOSTED_SYSTEM: > > GET_ARG(0); > > GET_ARG(1); > > @@ -444,6 +445,7 @@ void do_nios2_semihosting(CPUNios2State *env) > > } > > } > > break; > > +#endif > > default: > > qemu_log_mask(LOG_GUEST_ERROR, "nios2-semihosting: unsupported " > > "semihosting syscall %d\n", nr); > > Another option is to define a system() that always returns ENOSYS. Then > the #ifdefs can be avoided. Done. -j