[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/21] buildsys: Fix building without plugins on Darwin
From: |
Alex Bennée |
Subject: |
[PATCH v2 08/21] buildsys: Fix building without plugins on Darwin |
Date: |
Tue, 13 Aug 2024 21:23:16 +0100 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Since commit 0082475e26 the plugin symbol list is unconditionally
added to the linker flags, leading to a build failure:
Undefined symbols for architecture arm64:
"_qemu_plugin_entry_code", referenced from:
<initial-undefines>
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
ninja: build stopped: subcommand failed.
Fix by restricting the whole meson file to the --enable-plugins
configure argument.
Fixes: 0082475e26 ("meson: merge plugin_ldflags into emulator_link_args")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240813112457.92560-1-philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
plugins/meson.build | 50 +++++++++++++++++++++++----------------------
1 file changed, 26 insertions(+), 24 deletions(-)
diff --git a/plugins/meson.build b/plugins/meson.build
index 18a0303bff..1cc039d29b 100644
--- a/plugins/meson.build
+++ b/plugins/meson.build
@@ -1,3 +1,7 @@
+if not get_option('plugins')
+ subdir_done()
+endif
+
# Modules need more symbols than just those in plugins/qemu-plugins.symbols
if not enable_modules
if host_os == 'darwin'
@@ -12,29 +16,27 @@ if not enable_modules
endif
endif
-if get_option('plugins')
- if host_os == 'windows'
- dlltool = find_program('dlltool', required: true)
+if host_os == 'windows'
+ dlltool = find_program('dlltool', required: true)
- # Generate a .lib file for plugins to link against.
- # First, create a .def file listing all the symbols a plugin should expect
to have
- # available in qemu
- win32_plugin_def = configure_file(
- input: files('qemu-plugins.symbols'),
- output: 'qemu_plugin_api.def',
- capture: true,
- command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
- # then use dlltool to assemble a delaylib.
- win32_qemu_plugin_api_lib = configure_file(
- input: win32_plugin_def,
- output: 'libqemu_plugin_api.a',
- command: [dlltool, '--input-def', '@INPUT@',
- '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe']
- )
- endif
- specific_ss.add(files(
- 'loader.c',
- 'core.c',
- 'api.c',
- ))
+ # Generate a .lib file for plugins to link against.
+ # First, create a .def file listing all the symbols a plugin should expect
to have
+ # available in qemu
+ win32_plugin_def = configure_file(
+ input: files('qemu-plugins.symbols'),
+ output: 'qemu_plugin_api.def',
+ capture: true,
+ command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
+ # then use dlltool to assemble a delaylib.
+ win32_qemu_plugin_api_lib = configure_file(
+ input: win32_plugin_def,
+ output: 'libqemu_plugin_api.a',
+ command: [dlltool, '--input-def', '@INPUT@',
+ '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe']
+ )
endif
+specific_ss.add(files(
+ 'loader.c',
+ 'core.c',
+ 'api.c',
+))
--
2.39.2
- [PATCH v2 00/21] Various fixes and tweaks for 9.1-rc2/3, Alex Bennée, 2024/08/13
- [PATCH v2 02/21] Makefile: trigger re-configure on updated pythondeps, Alex Bennée, 2024/08/13
- [PATCH v2 04/21] configure: Avoid use of param. expansion when using gdb_version, Alex Bennée, 2024/08/13
- [PATCH v2 01/21] tests/avocado: Re-enable gdbsim-r5f562n8 testing U-Boot, Alex Bennée, 2024/08/13
- [PATCH v2 06/21] scripts/checkpatch: more checks on files imported from Linux, Alex Bennée, 2024/08/13
- [PATCH v2 05/21] configure: Fix GDB version detection for GDB_HAS_MTE, Alex Bennée, 2024/08/13
- [PATCH v2 03/21] configure: Fix arch detection for GDB_HAS_MTE, Alex Bennée, 2024/08/13
- [PATCH v2 08/21] buildsys: Fix building without plugins on Darwin,
Alex Bennée <=
- [PATCH v2 09/21] scripts/replay-dump.py: Update to current rr record format, Alex Bennée, 2024/08/13
- [PATCH v2 07/21] target/i386: allow access_ptr to force slow path on failed probe, Alex Bennée, 2024/08/13
- [PATCH v2 11/21] tests/avocado: excercise scripts/replay-dump.py in replay tests, Alex Bennée, 2024/08/13
- [PATCH v2 14/21] tests/avocado: replay_kernel.py add x86-64 q35 machine test, Alex Bennée, 2024/08/13
- [PATCH v2 12/21] replay: allow runstate shutdown->running when replaying trace, Alex Bennée, 2024/08/13
- [PATCH v2 13/21] Revert "replay: stop us hanging in rr_wait_io_event", Alex Bennée, 2024/08/13
- [PATCH v2 16/21] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state, Alex Bennée, 2024/08/13