On 2019-02-07 12:46, Giovanni Mascellani wrote:
> Hi,
> 
> Il 07/02/19 12:26, Thomas Huth ha scritto:
>> The problem is rather that the STCK instruction is fenced with
>> "#ifndef CONFIG_USER_ONLY" ... quick-n-dirty hack to allow it:
> 
> Thanks for the patch. Unfortunately on my system it failes with:
> 
>   LINK    s390x-linux-user/qemu-s390x
> /usr/bin/ld: ../libqemuutil.a(cpu-get-icount.o):(.bss+0x0): multiple
> definition of `use_icount'; exec.o:(.bss+0x58): first defined here
> collect2: error: ld returned 1 exit status
> make[1]: *** [Makefile:207: qemu-s390x] Error 1
> make: *** [Makefile:432: subdir-s390x-linux-user] Error 2
> 
> The error does not appear when compiling from current master.

I just saw it, too. Seems like the stubs/cpu-get-icount.c file now gets
pulled in for some reason. Try this on top:

diff --git a/stubs/cpu-get-icount.c b/stubs/cpu-get-icount.c
index 35f0c1e..8da6646 100644
--- a/stubs/cpu-get-icount.c
+++ b/stubs/cpu-get-icount.c
@@ -4,7 +4,7 @@
 #include "sysemu/cpus.h"
 #include "qemu/main-loop.h"

-int use_icount;
+int use_icount __attribute__((weak));

 int64_t cpu_get_icount(void)
 {

... anyway, I'll ponder about that a little bit and will try to come up
with a proper, mergable patch instead.

 Thomas

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to