qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Some patches for qemu on sparc


From: Jurij Smakov
Subject: [Qemu-devel] Some patches for qemu on sparc
Date: Tue, 7 Feb 2006 22:28:15 -0800 (PST)

Hi,

I'm trying to make qemu build on linux-sparc (Debian port). I've made some progress and sent the message included below to Debian qemu maintainers. They are probably too busy with other stuff, so I hope I can get some feedback from you. Please CC the replies to me since I'm not subscribed to this list.

Thanks,

Jurij Smakov                                        address@hidden
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC

---------- Forwarded message ----------
Date: Thu, 26 Jan 2006 22:05:11 -0800 (PST)
From: Jurij Smakov <address@hidden>
To: address@hidden, address@hidden
Cc: address@hidden
Subject: Some patches for qemu on sparc

found 317145 0.8.0-1
thanks

Hi,

I've started fiddling with qemu 0.8.0-1 on sparc in attempt to make it build. That's the issues I've encountered so far:

* Current build failure of qemu on sparc buildd was, in part, the buildd's
    fault. Due to a misconfiguration it was operating in 64-bit mode, which
    should not normally happen. Thanks for Ryan Murray for fixing it in no
    time.

* Nevertheless, even in intended 32-bit mode it still fails to build with
    the messages:

      gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -m32 -ffixed-g1 -ffixed-g2
      -ffixed-g3 -ffixed-g6 -fno-delayed-branch -ffixed-i0 -fno-reorder-blocks
      -fno-optimize-sibling-calls -I.
      -I/home/jurij/tmp/qemu-0.8.0/./target-i386
      -I/home/jurij/tmp/qemu-0.8.0/. -I/home/jurij/tmp/qemu-0.8.0/./linux-user
      -I/home/jurij/tmp/qemu-0.8.0/./linux-user/i386 -D_GNU_SOURCE
      -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
      -I/home/jurij/tmp/qemu-0.8.0/./fpu -DHAS_AUDIO
      -I/home/jurij/tmp/qemu-0.8.0/./slirp -c -o op.o
      /home/jurij/tmp/qemu-0.8.0/./target-i386/op.c
      In file included from /home/jurij/tmp/qemu-0.8.0/./target-i386/op.c:736:
      /home/jurij/tmp/qemu-0.8.0/./target-i386/ops_template.h: In function
      `op_jb_subb':
      /home/jurij/tmp/qemu-0.8.0/./target-i386/ops_template.h:278: warning:
      implicit declaration of function `GOTO_LABEL_PARAM'
      ../dyngen -o op.h op.o
      dyngen: Found bogus save at the start of op_pavgb_xmm
      make[2]: *** [op.h] Error 1
      make[2]: Leaving directory `/home/jurij/tmp/qemu-0.8.0/i386-user'
      make[1]: *** [all] Error 1
      make[1]: Leaving directory `/home/jurij/tmp/qemu-0.8.0'
      make: *** [debian/stamp-makefile-build] Error 2

    After some googling I was able to find fixes for this problem, mentioned
    on the upstream mailing list [0]. For some reason they did not get
    included in the current version.

* After applying the patches mentioned there, it proceeds a bit further,
    to fail again with the messages:

      gcc-3.4 -g -m32 -Wl,-T,/home/jurij/tmp/qemu-0.8.0/./sparc.ld -static -o
      qemu-i386 elfload.o main.o syscall.o mmap.o signal.o path.o osdep.o
      thunk.o vm86.o libqemu.a gdbstub.o   -lm -lrt
      /usr/bin/ld: BFD 2.16.91 20060118 Debian GNU/Linux assertion fail
      ../../bfd/elf.c:3864
      /usr/bin/ld: qemu-i386: Not enough room for program headers (allocated 5,
      need 6)
      /usr/bin/ld: final link failed: Bad value
      collect2: ld returned 1 exit status
      make[2]: *** [qemu-i386] Error 1
      make[2]: Leaving directory `/home/jurij/tmp/qemu-0.8.0/i386-user'
      make[1]: *** [all] Error 1
      make[1]: Leaving directory `/home/jurij/tmp/qemu-0.8.0'
      make: *** [debian/stamp-makefile-build] Error 2

    There appears to be no good solution for that kind of problem around.
    AFAICT, it's not binutils bug, but rather the problem with the linker
    script sparc.ld. It should be fixed somehow, but nobody appears to know
    how, so people were just replacing SIZEOF_HEADERS in the linker script
    with some reasonably big number [1] :-). Replacing it with 0x400 did fix
    the issue.

* That brought me further again, but still no cookie. Now it fails while
    building the arm target:

      gcc-3.4 -Wall -O2 -g -fno-strict-aliasing -m32 -ffixed-g1 -ffixed-g2
      -ffixed-g3 -ffixed-g6 -fno-delayed-branch -ffixed-i0 -fno-reorder-blocks
      -fno-optimize-sibling-calls -I. -I/home/jurij/tmp/qemu-0.8.0/./target-arm
      -I/home/jurij/tmp/qemu-0.8.0/. -I/home/jurij/tmp/qemu-0.8.0/./linux-user
      -I/home/jurij/tmp/qemu-0.8.0/./linux-user/arm -D_GNU_SOURCE
      -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
      -I/home/jurij/tmp/qemu-0.8.0/./fpu -I/home/jurij/tmp/qemu-0.8.0/./slirp
      -c
      -o op.o /home/jurij/tmp/qemu-0.8.0/./target-arm/op.c
      ../dyngen -o op.h op.o
      dyngen: No save at the beginning of op_movl_T0_r0
      make[2]: *** [op.h] Error 1
      make[2]: Leaving directory `/home/jurij/tmp/qemu-0.8.0/arm-user'
      make[1]: *** [all] Error 1
      make[1]: Leaving directory `/home/jurij/tmp/qemu-0.8.0'
      make: *** [debian/stamp-makefile-build] Error 2

    Function op_movl_T0_r0 (and others) in arm-user/op.o indeed does not
    contain a save in the beginning. That's how it looks according to
    objdump -d arm-user/op.o:

      00000000 <op_movl_T0_r0>:
         0:       c2 01 80 00     ld  [ %g6 ], %g1
         4:       81 c3 e0 08     retl
         8:       01 00 00 00     nop

    I have no idea how to fix that one, nor was I able to find anything
    relevant on the net (even though I did not look too hard). If you (or
    upstream) have any ideas regarding this, please let me know.

  Attached patch implements all the changes which got me that far.

[0] http://lists.gnu.org/archive/html/qemu-devel/2005-05/msg00039.html
[1] http://bugs.gentoo.org/show_bug.cgi?id=51078 comment #13

Best regards,

Jurij Smakov                                        address@hidden
Key: http://www.wooyd.org/pgpkey/                   KeyID: C99E03CC

Attachment: qemu.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]