runtime/qemu/runtime.patch

71 lines
2.3 KiB
Diff
Raw Permalink Normal View History

2024-11-10 10:26:16 +00:00
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -671,7 +671,8 @@
return optind;
}
-int main(int argc, char **argv, char **envp)
+#pragma GCC diagnostic ignored "-Wmissing-prototypes"
+int qemu_main(int argc, char **argv, char **envp)
{
struct target_pt_regs regs1, *regs = &regs1;
struct image_info info1, *info = &info1;
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9077,6 +9077,8 @@
int, __to_dfd, const char *, __to_pathname, unsigned int, flag)
#endif
+extern int trampoline_handle_syscall(int32_t num, uint32_t arg1, uint32_t arg2);
+
/* This is an internal helper for do_syscall so that it is easier
* to have a single return point, so that actions, such as logging
* of syscall results, can be performed.
@@ -9101,6 +9103,10 @@
#endif
void *p;
+ if (trampoline_handle_syscall(num, arg1, arg2)) {
+ return 0;
+ }
+
switch(num) {
case TARGET_NR_exit:
/* In old applications this may be used to implement _exit(2).
--- a/meson.build
+++ b/meson.build
@@ -2470,7 +2470,6 @@
config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'))
config_host_data.set('CONFIG_VALGRIND_H', cc.has_header('valgrind/valgrind.h'))
config_host_data.set('HAVE_BTRFS_H', cc.has_header('linux/btrfs.h'))
-config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h'))
config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h'))
config_host_data.set('HAVE_SYS_DISK_H', cc.has_header('sys/disk.h'))
config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h'))
@@ -4015,14 +4014,13 @@
exe_name += '-unsigned'
endif
- emulator = executable(exe_name, exe['sources'],
+ emulator = library(exe_name, exe['sources'],
install: true,
c_args: c_args,
dependencies: arch_deps + exe['dependencies'],
objects: lib.extract_all_objects(recursive: true),
link_depends: [block_syms, qemu_syms],
- link_args: link_args,
- win_subsystem: exe['win_subsystem'])
+ link_args: link_args)
if host_os == 'darwin'
icon = 'pc-bios/qemu.rsrc'
@@ -4166,9 +4164,7 @@
subdir('scripts')
subdir('tools')
-subdir('pc-bios')
subdir('docs')
-subdir('tests')
if gtk.found()
subdir('po')
endif