On 05/09/2024 21.53, Peter Maydell wrote:
On Thu, 5 Sept 2024 at 20:16, Thomas Huth <th...@redhat.com> wrote:

This reverts commit 10425887ba54241be1ce97f8935fc320332b531c.

Using "imply" instead of "select" is causing a build failure:

  /usr/bin/ld: libqemu-riscv32-softmmu.a.p/target_riscv_cpu_helper.c.o: in 
function `riscv_cpu_do_interrupt':
  .../qemu/target/riscv/cpu_helper.c:1678:(.text+0x2214): undefined reference 
to `do_common_semihosting'

Thus revert to fix the build.

Signed-off-by: Thomas Huth <th...@redhat.com>
---
  target/riscv/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/riscv/Kconfig b/target/riscv/Kconfig
index c332616d36..5f30df22f2 100644
--- a/target/riscv/Kconfig
+++ b/target/riscv/Kconfig
@@ -1,9 +1,9 @@
  config RISCV32
      bool
-    imply ARM_COMPATIBLE_SEMIHOSTING if TCG
+    select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
      select DEVICE_TREE # needed by boot.c

  config RISCV64
      bool
-    imply ARM_COMPATIBLE_SEMIHOSTING if TCG
+    select ARM_COMPATIBLE_SEMIHOSTING # for do_common_semihosting()
      select DEVICE_TREE # needed by boot.c

This will break the intended "we don't need semihosting if
this is a KVM-only compile", though. Can we fix the
build problem use see with
  "select ARM_COMPATIBLE_SEMIHOSTING if TCG"

I haven't tried, but I assume that this will produce the same linking issues when TCG is disabled. Maybe best if we fix it in the code, see the patch suggested here:

 https://lore.kernel.org/qemu-devel/20240906080928.710051-1-th...@redhat.com/

 Thomas


Reply via email to