qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] build-sys: fix win32 compilation with --target-list=''
@ 2020-12-17 10:44 marcandre.lureau
  2020-12-17 11:32 ` Claudio Fontana
  0 siblings, 1 reply; 8+ messages in thread
From: marcandre.lureau @ 2020-12-17 10:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Fixes linking:
x86_64-w64-mingw32-gcc  -o tests/test-qapi-util.exe version.rc_version.o tests/test-qapi-util.exe.p/test-qapi-util.c.obj -Wl,--allow-shlib-undefined -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -fstack-protector-strong -Wl,--start-group libqemuutil.a -pthread -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lgnutls -lwinmm -lm -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lgthread-2.0 -lglib-2.0 -lintl -lws2_32 -mconsole -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -Wl,--end-group
/usr/lib/gcc/x86_64-w64-mingw32/10.2.1/../../../../x86_64-w64-mingw32/bin/ld: libqemuutil.a(util_oslib-win32.c.obj): in function `qemu_try_set_nonblock':
/home/elmarco/src/qemu/buildw/../util/oslib-win32.c:224: undefined reference to `qemu_fd_register'

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 util/main-loop-stub.c | 26 ++++++++++++++++++++++++++
 util/meson.build      |  2 ++
 2 files changed, 28 insertions(+)
 create mode 100644 util/main-loop-stub.c

diff --git a/util/main-loop-stub.c b/util/main-loop-stub.c
new file mode 100644
index 0000000000..b3e175ade5
--- /dev/null
+++ b/util/main-loop-stub.c
@@ -0,0 +1,26 @@
+/*
+ * QEMU main loop stub impl
+ *
+ * Copyright (c) 2020 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/main-loop.h"
+
+void qemu_fd_register(int fd)
+{
+}
diff --git a/util/meson.build b/util/meson.build
index f359af0d46..462b79a61a 100644
--- a/util/meson.build
+++ b/util/meson.build
@@ -79,4 +79,6 @@ if have_block
   util_ss.add(when: 'CONFIG_INOTIFY1', if_true: files('filemonitor-inotify.c'),
                                         if_false: files('filemonitor-stub.c'))
   util_ss.add(when: 'CONFIG_LINUX', if_true: files('vfio-helpers.c'))
+else
+  util_ss.add(files('main-loop-stub.c'))
 endif
-- 
2.29.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-12-18 13:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 10:44 [PATCH] build-sys: fix win32 compilation with --target-list='' marcandre.lureau
2020-12-17 11:32 ` Claudio Fontana
2020-12-17 11:41   ` Marc-André Lureau
2020-12-17 11:46   ` Paolo Bonzini
2020-12-18 13:01     ` Marc-André Lureau
2020-12-18 13:21       ` Paolo Bonzini
2020-12-18 13:33         ` Marc-André Lureau
2020-12-18 13:23       ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).