diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-18 10:45:17 +0100 |
|---|---|---|
| committer | Alex Bennée <alex.bennee@linaro.org> | 2024-07-22 09:38:03 +0100 |
| commit | bf9ab9d1317e9e27e27d63e94c2e13db2319e2c2 (patch) | |
| tree | c9421a2295852315d95ba99d780eeab3f94b138c | |
| parent | f961773ce13d61f56506dc4964e28f0594c7920f (diff) | |
| download | focaccia-qemu-bf9ab9d1317e9e27e27d63e94c2e13db2319e2c2.tar.gz focaccia-qemu-bf9ab9d1317e9e27e27d63e94c2e13db2319e2c2.zip | |
target/m68k: Add semihosting stub
Since the SEMIHOSTING feature is optional, we need a stub to link when it is disabled. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20240717105723.58965-3-philmd@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240718094523.1198645-10-alex.bennee@linaro.org>
| -rw-r--r-- | target/m68k/meson.build | 5 | ||||
| -rw-r--r-- | target/m68k/semihosting-stub.c | 15 |
2 files changed, 19 insertions, 1 deletions
diff --git a/target/m68k/meson.build b/target/m68k/meson.build index 8d3f9ce288..4d213daaf6 100644 --- a/target/m68k/meson.build +++ b/target/m68k/meson.build @@ -11,9 +11,12 @@ m68k_ss.add(files( m68k_system_ss = ss.source_set() m68k_system_ss.add(files( - 'm68k-semi.c', 'monitor.c' )) +m68k_system_ss.add(when: ['CONFIG_SEMIHOSTING'], + if_true: files('m68k-semi.c'), + if_false: files('semihosting-stub.c') +) target_arch += {'m68k': m68k_ss} target_system_arch += {'m68k': m68k_system_ss} diff --git a/target/m68k/semihosting-stub.c b/target/m68k/semihosting-stub.c new file mode 100644 index 0000000000..d6a5965e29 --- /dev/null +++ b/target/m68k/semihosting-stub.c @@ -0,0 +1,15 @@ +/* + * m68k/ColdFire semihosting stub + * + * SPDX-FileContributor: Philippe Mathieu-Daudé <philmd@linaro.org> + * SPDX-FileCopyrightText: 2024 Linaro Ltd. + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "cpu.h" + +void do_m68k_semihosting(CPUM68KState *env, int nr) +{ + g_assert_not_reached(); +} |