qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Building qemu on UltraSparc
@ 2005-05-21 17:32 Jérôme Warnier
  2005-05-21 23:26 ` Herbert Poetzl
  0 siblings, 1 reply; 8+ messages in thread
From: Jérôme Warnier @ 2005-05-21 17:32 UTC (permalink / raw)
  To: List qemu-devel

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

I'm trying to build qEmu v0.7.0 on Debian Sarge on a Sparc64 machine,
and it fails with strange errors.
Does anybody here have any idea to help me achieve it?

I attach the log of the build to this mail.

Thanks

[-- Attachment #2: qemu_0.7.0-0bxlug0_sparc.build.gz --]
[-- Type: application/x-gzip, Size: 3364 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
  2005-05-21 17:32 [Qemu-devel] Building qemu on UltraSparc Jérôme Warnier
@ 2005-05-21 23:26 ` Herbert Poetzl
  2005-05-22  0:13   ` Jérôme Warnier
  0 siblings, 1 reply; 8+ messages in thread
From: Herbert Poetzl @ 2005-05-21 23:26 UTC (permalink / raw)
  To: Jérôme Warnier; +Cc: List qemu-devel

On Sat, May 21, 2005 at 07:32:11PM +0200, Jérôme Warnier wrote:
> I'm trying to build qEmu v0.7.0 on Debian Sarge on a Sparc64 machine,
> and it fails with strange errors.
> Does anybody here have any idea to help me achieve it?

well, looks like you hit 32 vs 64 bit issues here, don't know
the details about the sparc/64 support but I'd try to build
as sparc32 first and see how far that gets ...

HTH,
Herbert

> I attach the log of the build to this mail.
> 
> Thanks

> dpkg-buildpackage: source package is qemu
> dpkg-buildpackage: source version is 0.7.0-0bxlug0
> dpkg-buildpackage: source maintainer is Jerome Warnier <jwarnier@beeznest.net>
> dpkg-buildpackage: host architecture is sparc
>  fakeroot debian/rules clean
> test -x debian/rules
> test "`id -u`" = 0
> if test -n "" && test "" != "."; then rmdir ""; fi
> if test "." != "."; then rmdir .; fi
> dh_clean
> /usr/bin/make -f debian/rules reverse-config
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> make[1]: Nothing to be done for `reverse-config'.
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> patches: debian/patches/01_doc_typos.patch debian/patches/03_use_external_bios.patch debian/patches/04_do_not_print_rtc_freq_if_ok.patch
> Not reversing not applied patches.
> if [ "reverse-patches" = "debian/stamp-patched" ] ; then touch debian/stamp-patched ; \
> elif [ "reverse-patches" = "reverse-patches" ] ; then rm -f debian/stamp-patch* ; \
> fi
> /usr/bin/make -f debian/rules update-config
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> make[1]: Nothing to be done for `update-config'.
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> rm -f debian/patches/*.log
> make -C . -k distclean || true
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 
> rm -f *.o *.a qemu-img dyngen TAGS *.pod *~ */*~
> make -C tests clean
> make[2]: Entering directory `/home/jwarnier/debian/qemu-0.7.0/tests'
> rm -f *~ *.o test-i386.out test-i386.ref \
>            test-x86_64.log test-x86_64.ref qruncom sha1
> make[2]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0/tests'
> for d in ; do \
> make -C $d clean || exit 1 ; \
>         done
> rm -f config-host.mak config-host.h
> for d in ; do \
> rm -rf $d || exit 1 ; \
>         done
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> rm -f debian/stamp-makefile-build
> if [ -f "./config.log" ] && grep -i 'generated.*by.*autoconf' "./config.log" 1>/dev/null; then \
>   rm -f "./config.log"; \
> fi
> rm -f debian/stamp-autotools-files
> if test -f ./config.status && grep -i -q 'Generated.*by configure.' ./config.status; then rm -f ./config.status; fi
> if test -f ./config.cache && grep -i -q 'shell.*script.*caches.*results.*configure' ./config.cache; then rm -f ./config.cache; fi
> rm -f qemu-doc.html qemu.1
> rm -f 
> rm -f pc-bios/*.elf pc-bios/*.tar.gz
>  dpkg-source -b qemu-0.7.0
> dpkg-source: building qemu using existing qemu_0.7.0.orig.tar.gz
> dpkg-source: building qemu in qemu_0.7.0-0bxlug0.diff.gz
> dpkg-source: warning: ignoring deletion of file pc-bios/bios.bin
> dpkg-source: warning: ignoring deletion of file pc-bios/ppc_rom.bin
> dpkg-source: warning: ignoring deletion of file pc-bios/proll.elf
> dpkg-source: warning: ignoring deletion of file pc-bios/vgabios-cirrus.bin
> dpkg-source: warning: ignoring deletion of file pc-bios/vgabios.bin
> dpkg-source: warning: ignoring deletion of file qemu-doc.html
> dpkg-source: warning: ignoring deletion of file qemu.1
> dpkg-source: building qemu in qemu_0.7.0-0bxlug0.dsc
>  debian/rules build
> test -x debian/rules
> if [ -n "" ]; then \
>   mkdir -p ""; \
> fi
> if [ ! -d "." ]; then \
>   mkdir -p "."; \
> fi
> /usr/share/cdbs/1/rules/buildcore.mk:116: "DEB_BUILD_MAKE_TARGET is a deprecated variable"
> /usr/share/cdbs/1/rules/buildcore.mk:116: "DEB_CLEAN_MAKE_TARGET is a deprecated variable"
> /usr/share/cdbs/1/rules/buildcore.mk:116: "DEB_MAKE_TEST_TARGET is a deprecated variable"
> if [ -z "" ]; then \
>   if ! test -f debian/compat; then echo 4 > debian/compat; fi; \
> fi
> /usr/bin/make -f debian/rules reverse-config
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> make[1]: Nothing to be done for `reverse-config'.
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> patches: debian/patches/01_doc_typos.patch debian/patches/03_use_external_bios.patch debian/patches/04_do_not_print_rtc_freq_if_ok.patch
> Trying patch debian/patches/01_doc_typos.patch at level 1...1...success.
> Trying patch debian/patches/03_use_external_bios.patch at level 1...1...success.
> Trying patch debian/patches/04_do_not_print_rtc_freq_if_ok.patch at level 1...1...success.
> if [ "debian/stamp-patched" = "debian/stamp-patched" ] ; then touch debian/stamp-patched ; \
> elif [ "debian/stamp-patched" = "reverse-patches" ] ; then rm -f debian/stamp-patch* ; \
> fi
> /usr/bin/make -f debian/rules update-config
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> make[1]: Nothing to be done for `update-config'.
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> if test "" = "pre" ; then \
> 	cd . && libtoolize -c -f ; \
> fi
> if test -n "" ; then \
> 	if test -d ./m4 ; then m4="-I m4" ; fi ; \
> 	if test -e ./aclocal.m4 ; then cd . && aclocal- $m4 ; fi ; \
> elif test -n "" ; then \
> 	if test -d ./m4 ; then m4="-I m4" ; fi ; \
> 	if test -e ./aclocal.m4 ; then cd . && aclocal- $m4 ; fi ; \
> fi
> if test -n "" ; then \
> 	if test -e ./configure.ac || test -e ./configure.in ; then cd . && `which autoconf || which autoconf` ; fi ; \
> fi
> if test -n "" ; then \
> 	if test -e ./configure.ac || test -e ./configure.in ; then cd . && `which autoheader || which autoheader` ; fi ; \
> fi
> if test -n "" ; then \
> 	if test -e ./Makefile.am ; then cd . && automake- ; fi ; \
> fi
> touch debian/stamp-autotools-files
> chmod a+x /home/jwarnier/debian/qemu-0.7.0/./configure 
> if test ""; then cd ""; else cd "."; fi && CC="cc" CXX="g++" CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" /home/jwarnier/debian/qemu-0.7.0/./configure  --prefix=/usr --enable-slirp --disable-maintainer-mode   
> Install prefix    /usr
> BIOS directory    /usr/share/qemu
> binary directory  /usr/bin
> Manual directory  /usr/share/man
> ELF interp prefix /usr/gnemul/qemu-%M
> Source path       /home/jwarnier/debian/qemu-0.7.0/.
> C compiler        gcc
> make              make
> host CPU          sparc64
> host big endian   yes
> target list       i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu
> gprof enabled     no
> static build      no
> SDL support       yes
> SDL static link   no
> mingw32 support   no
> Adlib support     no
> FMOD support      no
> kqemu support     no
> ln: `/home/jwarnier/debian/qemu-0.7.0/./Makefile' and `Makefile' are the same file
> ln: `/home/jwarnier/debian/qemu-0.7.0/./tests/Makefile' and `tests/Makefile' are the same file
> if test "" = "post" ; then \
> 	if test -e ./libtool ; then cp -f /usr/bin/libtool ./libtool ; fi ; \
> fi
> make -C . 
> make[1]: Entering directory `/home/jwarnier/debian/qemu-0.7.0'
> gcc -Wall -O2 -g -fno-strict-aliasing  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o dyngen dyngen.c
> dyngen.c: In function `gen_code':
> dyngen.c:1682: warning: long int format, different type arg (arg 4)
> dyngen.c:2169: warning: int format, different type arg (arg 3)
> dyngen.c:2179: warning: int format, different type arg (arg 3)
> dyngen.c:2179: warning: int format, different type arg (arg 4)
> dyngen.c:2189: warning: int format, different type arg (arg 3)
> dyngen.c:2189: warning: int format, different type arg (arg 4)
> dyngen.c:2201: warning: int format, different type arg (arg 3)
> dyngen.c:2201: warning: int format, different type arg (arg 4)
> dyngen.c:2201: warning: int format, different type arg (arg 7)
> gcc -DQEMU_TOOL -Wall -O2 -g -fno-strict-aliasing  -g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o qemu-img qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c -lz 
> texi2html -monolithic -number qemu-doc.texi
> ./texi2pod.pl qemu-doc.texi qemu.pod
> pod2man --section=1 --center=" " --release=" " qemu.pod > qemu.1
> for d in i386-user arm-user armeb-user sparc-user ppc-user i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
> make -C $d all || exit 1 ; \
>         done
> make[2]: Entering directory `/home/jwarnier/debian/qemu-0.7.0/i386-user'
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o elfload.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/elfload.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:13:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c: In function `create_elf_tables':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:678: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:678: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:678: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:678: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:679: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:679: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:679: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:679: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:684: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:684: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:684: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:684: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:693: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:693: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:693: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/elfload.c:693: warning: cast from pointer to integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o main.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/main.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/main.c:27:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o syscall.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/syscall.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:67:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c: In function `target_to_host_cmsg':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:450: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c: In function `host_to_target_cmsg':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:494: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c: In function `do_socketcall':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:667: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:678: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:697: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:698: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:712: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:713: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:727: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:728: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:744: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:757: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:767: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:777: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:780: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:791: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:794: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:795: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:824: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:825: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:833: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:835: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:858: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:869: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:870: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c: In function `do_syscall':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:1667: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:1671: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2131: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2131: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2132: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2132: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2613: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall.c:2628: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o mmap.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/mmap.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/mmap.c:28:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o signal.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/signal.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:29:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `host_to_target_siginfo_noswap':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:215: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `target_to_host_siginfo':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:256: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `setup_sigcontext':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:616: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:616: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:616: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:616: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `setup_frame':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:686: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:686: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:686: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:686: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `setup_rt_frame':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:732: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:732: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:732: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:732: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:733: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:733: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:733: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:733: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:759: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:759: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:759: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:759: warning: cast from pointer to integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `restore_sigcontext':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:818: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `do_sigreturn':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:838: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c: In function `do_rt_sigreturn':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/signal.c:869: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o path.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/path.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/path.c:13:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o osdep.o /home/jwarnier/debian/qemu-0.7.0/./osdep.c
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o thunk.o /home/jwarnier/debian/qemu-0.7.0/./thunk.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/thunk.c:24:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o vm86.o /home/jwarnier/debian/qemu-0.7.0/./linux-user/vm86.c
> In file included from /home/jwarnier/debian/qemu-0.7.0/linux-user/qemu.h:8,
>                  from /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c:27:
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h: In function `__target_cmsg_nxthdr':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:184: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/syscall_defs.h:187: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c: In function `do_int':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c:205: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c:214: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c: In function `handle_vm86_fault':
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c:261: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/linux-user/vm86.c:265: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o exec.o /home/jwarnier/debian/qemu-0.7.0/./exec.c
> /home/jwarnier/debian/qemu-0.7.0/exec.c: In function `cpu_physical_memory_rw':
> /home/jwarnier/debian/qemu-0.7.0/exec.c:2042: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/exec.c:2046: warning: cast to pointer from integer of different size
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o kqemu.o /home/jwarnier/debian/qemu-0.7.0/./kqemu.c
> gcc -Wall -O2 -g -fno-strict-aliasing -m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 -fno-delayed-branch -ffixed-i0 -fno-reorder-blocks -fno-optimize-sibling-calls -I. -I/home/jwarnier/debian/qemu-0.7.0/./target-i386 -I/home/jwarnier/debian/qemu-0.7.0/. -I/home/jwarnier/debian/qemu-0.7.0/./linux-user -I/home/jwarnier/debian/qemu-0.7.0/./linux-user/i386 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/jwarnier/debian/qemu-0.7.0/./fpu -I/home/jwarnier/debian/qemu-0.7.0/./slirp -c -o op.o /home/jwarnier/debian/qemu-0.7.0/./target-i386/op.c
> In file included from /usr/include/inttypes.h:28,
>                  from /home/jwarnier/debian/qemu-0.7.0/cpu-defs.h:25,
>                  from /home/jwarnier/debian/qemu-0.7.0/target-i386/exec.h:30,
>                  from /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c:22:
> /usr/include/stdint.h:41: error: conflicting types for `int64_t'
> /home/jwarnier/debian/qemu-0.7.0/dyngen-exec.h:44: error: previous declaration of `int64_t'
> /usr/include/stdint.h:56: error: conflicting types for `uint64_t'
> /home/jwarnier/debian/qemu-0.7.0/dyngen-exec.h:35: error: previous declaration of `uint64_t'
> In file included from /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c:724:
> /home/jwarnier/debian/qemu-0.7.0/target-i386/ops_template.h: In function `op_jb_subb':
> /home/jwarnier/debian/qemu-0.7.0/target-i386/ops_template.h:278: warning: implicit declaration of function `GOTO_LABEL_PARAM'
> /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c: In function `op_goto_tb0':
> /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c:1277: warning: cast to pointer from integer of different size
> /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c: In function `op_goto_tb1':
> /home/jwarnier/debian/qemu-0.7.0/target-i386/op.c:1282: warning: cast to pointer from integer of different size
> make[2]: *** [op.o] Error 1
> make[2]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0/i386-user'
> make[1]: *** [all] Error 1
> make[1]: Leaving directory `/home/jwarnier/debian/qemu-0.7.0'
> make: *** [debian/stamp-makefile-build] Error 2
> 
> gzip: stdout: Broken pipe

> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
  2005-05-21 23:26 ` Herbert Poetzl
@ 2005-05-22  0:13   ` Jérôme Warnier
  2005-09-04  1:13     ` Jérôme Warnier
  0 siblings, 1 reply; 8+ messages in thread
From: Jérôme Warnier @ 2005-05-22  0:13 UTC (permalink / raw)
  To: List qemu-devel

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

Le dimanche 22 mai 2005 à 01:26 +0200, Herbert Poetzl a écrit :
> On Sat, May 21, 2005 at 07:32:11PM +0200, Jérôme Warnier wrote:
> > I'm trying to build qEmu v0.7.0 on Debian Sarge on a Sparc64 machine,
> > and it fails with strange errors.
> > Does anybody here have any idea to help me achieve it?
> 
> well, looks like you hit 32 vs 64 bit issues here, don't know
> the details about the sparc/64 support but I'd try to build
> as sparc32 first and see how far that gets ...
I tried that (starting with utility sparc32), and it even fails faster.
See the log attached.

> HTH,
> Herbert

> > I attach the log of the build to this mail.
> > 
> > Thanks

Thanks for your help.

[..]

[-- Attachment #2: qemu_0.7.0-0bxlug1_sparc.build.gz --]
[-- Type: application/x-gzip, Size: 2492 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
@ 2005-05-23  8:38 Juergen Keil
  2005-05-24 10:58 ` Nardmann, Heiko
  0 siblings, 1 reply; 8+ messages in thread
From: Juergen Keil @ 2005-05-23  8:38 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: TEXT/plain, Size: 7591 bytes --]



> Le dimanche 22 mai 2005 à 01:26 +0200, Herbert Poetzl a écrit :
> > On Sat, May 21, 2005 at 07:32:11PM +0200, Jérôme Warnier wrote:
> > > I'm trying to build qEmu v0.7.0 on Debian Sarge on a Sparc64 machine,
> > > and it fails with strange errors.
> > > Does anybody here have any idea to help me achieve it?
> > 
> > well, looks like you hit 32 vs 64 bit issues here, don't know
> > the details about the sparc/64 support but I'd try to build
> > as sparc32 first and see how far that gets ...
> I tried that (starting with utility sparc32), and it even fails faster.
> See the log attached.
> 
> > HTH,
> > Herbert
> 
> > > I attach the log of the build to this mail.
> > > 
> > > Thanks
> 
> Thanks for your help.
> 
> [..]


SPARC Host support is quite broken at this time, it seems.


> In file included from 
/home/jwarnier/debian/qemu-0.7.0/target-i386/op.c:724:/home/jwarnier/debian/qemu-0.7.0/targe
t-i386/ops_template.h: In function `op_jb_subb':
> /home/jwarnier/debian/qemu-0.7.0/target-i386/ops_template.h:278: warning: implicit 
declaration of function `GOTO_LABEL_PARAM'


Yep, the macro GOTO_LABEL_PARAM is not defined for the sparc platform.

This needs to be fixed in dyngen-exec.h, with something like this:

Index: dyngen-exec.h
===================================================================
RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v
retrieving revision 1.25
diff -u -B -b -u -6 -r1.25 dyngen-exec.h
--- dyngen-exec.h       24 Apr 2005 18:01:56 -0000      1.25
+++ dyngen-exec.h       23 May 2005 08:04:45 -0000
@@ -225,14 +246,14 @@
 #ifdef __ia64__
 #define EXIT_TB() asm volatile ("br.ret.sptk.many b0;;")
 #define GOTO_LABEL_PARAM(n) asm volatile ("br.sptk.many " \
                                          ASM_NAME(__op_gen_label) #n)
 #endif
 #ifdef __sparc__
-#define EXIT_TB() asm volatile ("jmpl %i0 + 8, %g0\n" \
-                                "nop")
+#define EXIT_TB() asm volatile ("jmpl %i0 + 8, %g0; nop")
+#define        GOTO_LABEL_PARAM(n) asm volatile ("ba " ASM_NAME(__op_gen_label) #n ";nop")
 #endif
 #ifdef __arm__
 #define EXIT_TB() asm volatile ("b exec_loop")
 #define GOTO_LABEL_PARAM(n) asm volatile ("b " ASM_NAME(__op_gen_label) #n)
 #endif
 #ifdef __mc68000


The new "ba" instruction also requires a new type of relocation support for
R_SPARC_WDISP22 relocations in dyngen:

Index: dyngen.c
===================================================================
RCS file: /cvsroot/qemu/qemu/dyngen.c,v
retrieving revision 1.40
diff -u -B -b -u -6 -r1.40 dyngen.c
--- dyngen.c    27 Apr 2005 19:55:58 -0000      1.40
+++ dyngen.c    23 May 2005 08:04:45 -0000
@@ -2142,12 +2142,24 @@
                                    "    & 0x3fffffff);\n",
                                    rel->r_offset - start_offset,
                                    rel->r_offset - start_offset,
                                    name, addend,
                                    rel->r_offset - start_offset);
                            break;
+                       case R_SPARC_WDISP22:
+                           fprintf(outfile,
+                                   "    *(uint32_t *)(gen_code_ptr + %d) = "
+                                   "((*(uint32_t *)(gen_code_ptr + %d)) "
+                                   " & ~0x3fffff) "
+                                   " | ((((%s + %d) - (long)(gen_code_ptr + %d))>>2) "
+                                   "    & 0x3fffff);\n",
+                                   rel->r_offset - start_offset,
+                                   rel->r_offset - start_offset,
+                                   name, addend,
+                                   rel->r_offset - start_offset);
+                           break;
                         default:
                             error("unsupported sparc relocation (%d)", type);
                         }
                     }
                 }
             }


sparc64 probably needs a similar change to support WDISP22 relocations.



> ../dyngen -o op.h op.o
> dyngen: Found bogus save at the start of op_pavgb_mmx


That's another issue with sparc host support. x86 MMX instruction
support was added to qemu some time ago, and the compiler needs a *lot*
of register variables for the MMX opcode code templates.  Problem is
that on sparc a lot of cpu registers are already in use as "global
register" variables: most sparc global registers g1-g3, g6 and all local
registers l0-l7.  So the compiler starts to generate code that uses
frame pointer relative temporary variables in memory, because it's
running out of free cpu registers.  The use of temporary variables in
memory is incompatible with the way qemu's dyngen code generator works
on sparc.  That's basically what dyngen seems to be complaining about.



I've fixed this for now for Solaris SPARC host support, by reducing the
number of global cpu registers to just the global registers (g2-g6) -
freeing the local registers l0-l7.  With that change op_pavgb_mmx
doesn't need temporary variables in the local stack frame any more.

Index: dyngen-exec.h
===================================================================
RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v
retrieving revision 1.25
diff -u -B -b -u -6 -r1.25 dyngen-exec.h
--- dyngen-exec.h       24 Apr 2005 18:01:56 -0000      1.25
+++ dyngen-exec.h       23 May 2005 08:04:45 -0000
@@ -106,24 +119,32 @@
 #define AREG0 "s3"
 #define AREG1 "s0"
 #define AREG2 "s1"
 #define AREG3 "s2"
 #endif
 #ifdef __sparc__
+#ifdef _SOLARIS
+#define AREG0 "g2"
+#define AREG1 "g3"
+#define AREG2 "g4"
+#define AREG3 "g5"
+#define AREG4 "g6"
+#else
 #define AREG0 "g6"
 #define AREG1 "g1"
 #define AREG2 "g2"
 #define AREG3 "g3"
 #define AREG4 "l0"
 #define AREG5 "l1"
 #define AREG6 "l2"
 #define AREG7 "l3"
 #define AREG8 "l4"
 #define AREG9 "l5"
 #define AREG10 "l6"
 #define AREG11 "l7"
+#endif
 #define USE_FP_CONVERT
 #endif
 #ifdef __s390__
 #define AREG0 "r10"
 #define AREG1 "r7"
 #define AREG2 "r8"
Index: Makefile.target
===================================================================
RCS file: /cvsroot/qemu/qemu/Makefile.target,v
retrieving revision 1.69
diff -u -B -b -u -6 -r1.69 Makefile.target
--- Makefile.target     28 Apr 2005 21:15:08 -0000      1.69
+++ Makefile.target     23 May 2005 08:04:44 -0000
@@ -157,19 +157,25 @@
 ifeq ($(ARCH),s390)
 OP_CFLAGS=$(CFLAGS)
 LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld
 endif

 ifeq ($(ARCH),sparc)
+ifeq ($(CONFIG_SOLARIS),yes)
+CFLAGS+=-m32 -ffixed-g2 -ffixed-g3
+LDFLAGS+=-m32
+OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0
+else
 CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6
 LDFLAGS+=-m32
 OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0
 HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat
 # -static is used to avoid g1/g3 usage by the dynamic linker
 LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static
 endif
+endif

 ifeq ($(ARCH),sparc64)
 CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6
 LDFLAGS+=-m64
 OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0
 endif


All of the above changes are part of bigger Solaris x86 / Solaris SPARC
/ FreeBSD / NetBSD patch that I'll attach below.


This patch won't immediately fix the issues that you've got on
linux/sparc, but it should give you some ideas where to start fixing
the build issues.

--
Juergen Keil          		jk@tools.de
Tools GmbH			+49 (228) 9858011

[-- Attachment #2: qemu-solaris-freebsd-netbsd-patch.gz --]
[-- Type: APPLICATION/octet-stream, Size: 15427 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
  2005-05-23  8:38 Juergen Keil
@ 2005-05-24 10:58 ` Nardmann, Heiko
  0 siblings, 0 replies; 8+ messages in thread
From: Nardmann, Heiko @ 2005-05-24 10:58 UTC (permalink / raw)
  To: qemu-devel, Juergen Keil

[-- Attachment #1: Type: text/plain, Size: 6857 bytes --]

On Montag 23 Mai 2005 10:38, Juergen Keil wrote:
[snip]
> All of the above changes are part of bigger Solaris x86 / Solaris SPARC
> / FreeBSD / NetBSD patch that I'll attach below.
>
>
> This patch won't immediately fix the issues that you've got on
> linux/sparc, but it should give you some ideas where to start fixing
> the build issues.
>
> --
> Juergen Keil          		jk@tools.de
> Tools GmbH			+49 (228) 9858011

You probably did your diff against CVS? I have tried it using with clean 0.7.0 
distribution (gpatch -p0 < ../qemu-solaris-freebsd-netbsd--patch) and got the 
following:

patching file Makefile
patching file Makefile.target
patching file block.c
Hunk #1 succeeded at 528 (offset -3 lines).
patching file bswap.h
patching file configure
Hunk #6 FAILED at 359.
Hunk #7 succeeded at 442 (offset -1 lines).
Hunk #9 succeeded at 502 (offset -1 lines).
Hunk #11 succeeded at 598 (offset -1 lines).
Hunk #13 succeeded at 674 (offset -1 lines).
Hunk #15 succeeded at 780 (offset -1 lines).
1 out of 15 hunks FAILED -- saving rejects to file configure.rej
patching file cpu-exec.c
patching file dyngen-exec.h
patching file dyngen.c
patching file osdep.h
patching file vl.c
Hunk #2 succeeded at 520 (offset -3 lines).
Hunk #4 succeeded at 1631 (offset -3 lines).
patching file vl.h
patching file audio/mixeng.c
patching file fpu/softfloat-native.c
patching file fpu/softfloat-native.h
patching file fpu/softfloat.h
patching file hw/ide.c
Hunk #1 succeeded at 358 (offset -1 lines).
Hunk #3 succeeded at 460 (offset -1 lines).
Hunk #4 succeeded at 894 (offset -24 lines).
Hunk #5 succeeded at 951 (offset -1 lines).
Hunk #6 succeeded at 2204 (offset -26 lines).
Hunk #7 succeeded at 2252 (offset -1 lines).
patching file linux-user/main.c
patching file linux-user/syscall.c
patching file slirp/mbuf.c
patching file slirp/slirp.c
patching file slirp/slirp.h
patching file slirp/socket.c
patching file target-arm/cpu.h
patching file target-i386/cpu.h
patching file target-ppc/cpu.h
patching file target-ppc/helper.c
patching file target-ppc/op_helper.c
patching file target-sparc/cpu.h

This has not been a problem. I have done the following configure call then:

./configure --prefix=$HOME/qemu-0.7.0.installed --target-list="i386-softmmu" 
--cc=gcc-3.4.2 --interp-prefix=$HOME/qemu-0.7.0.installed

Fine, too. Also compilation works fine. But linking fails with the following 
error message:

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c21f does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c216 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c20d does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c200 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c1f7 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c1ea does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34c1dd does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b9b6 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b9ad does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b9a4 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b997 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b98d does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b980 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b973 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b967 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b95b does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b952 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34b949 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34adad does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ada4 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad9b does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad90 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad87 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad7c does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad71 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad65 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad59 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad50 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34ad47 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34a0e3 does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34a0db does not fit

ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
__op_gen_label1: value 0x34a0d3 does not fit

collect2: ld returned 1 exit status

Any idea what is happening here?

I have done this on Solaris 9 on a Sun Fire v250 with gcc-3.4.2 and native 
ld/as.

-- 
Heiko Nardmann (Dipl.-Ing. Technische Informatik)
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
@ 2005-05-24 12:20 Juergen Keil
  2005-05-24 15:14 ` Nardmann, Heiko
  0 siblings, 1 reply; 8+ messages in thread
From: Juergen Keil @ 2005-05-24 12:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: Heiko.Nardmann


Heiko.Nardmann wrote:

> On Montag 23 Mai 2005 10:38, Juergen Keil wrote:
> [snip]
> > All of the above changes are part of bigger Solaris x86 / Solaris SPARC
> > / FreeBSD / NetBSD patch that I'll attach below.
> >
> >
> > This patch won't immediately fix the issues that you've got on
> > linux/sparc, but it should give you some ideas where to start fixing
> > the build issues.
> 
> You probably did your diff against CVS? I have tried it using with clean 0.7.0 
> distribution (gpatch -p0 < ../qemu-solaris-freebsd-netbsd--patch) and got the 
> following:
> 
> patching file Makefile
> patching file Makefile.target
> patching file block.c
> Hunk #1 succeeded at 528 (offset -3 lines).
> ...

Yes, the patch was against current qemu cvs sources.


> This has not been a problem. I have done the following configure call then:
> 
> ./configure --prefix=$HOME/qemu-0.7.0.installed --target-list="i386-softmmu" 
> --cc=gcc-3.4.2 --interp-prefix=$HOME/qemu-0.7.0.installed
> 
> Fine, too. Also compilation works fine. But linking fails with the following 
> error message:
> 
> ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
> __op_gen_label1: value 0x34c21f does not fit
> ...
> ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
> __op_gen_label1: value 0x34a0d3 does not fit
> 
> collect2: ld returned 1 exit status
> 
> Any idea what is happening here?


Part of the problem is my GOTO_LABEL_PARAM macro for sparc, in dyngen-exec.h:

    #define GOTO_LABEL_PARAM(n) asm volatile ("ba " ASM_NAME(__op_gen_label) #n 
";nop")


We have 22 bits in the branch instruction to encode a signed 32-bit word
offset, relative to the current PC. The target address is always a
multiple of 4, so the offset encoded in the branch instruction is an
offset measured in 32-bit words.


The sparc branch instructions cannot jump forward / backward more than
8 mbytes (2^21 * 4 = 8mbyte).


What appears to be happening on your system is that the opcode
templates from the code section for "target-i386/op.c" (these contain
the "ba" branch instruction from the GOTO_LABEL_PARAM macro) jump to an
integer variable that is allocated somewhere in the data or bss section
(the "int __op_gen_label1" variable defined in dyngen.h), and the code
& data section on your system are more than 8 mbytes apart.


Apparently I had luck upto now, because on my solaris 10 sparc box there
have been no such issues with R_SPARC_WDISP22 relocation errors.


> ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o): symbol 
> __op_gen_label1: value 0x34c21f does not fit

  --> 0x34c21f * 4 = 13830268 = 13.8 mbytes


I guess this can be fixed by moving the branch target "__op_gen_label1"
from the data section to the code section.  A "size" on my sparc qemu
binary reports a total code size of ~ 1 mbyte, so that there should be
no issues with R_SPARC_WDISP22 overflows when both the branch instruction
and the branch target are both in the code (.text) section.

A fix would be:

Index: dyngen.h
===================================================================
RCS file: /cvsroot/qemu/qemu/dyngen.h,v
retrieving revision 1.8
diff -u -B -r1.8 dyngen.h
--- dyngen.h    7 Apr 2005 22:20:28 -0000       1.8
+++ dyngen.h    24 May 2005 12:03:11 -0000
@@ -19,7 +19,13 @@
  */

 int __op_param1, __op_param2, __op_param3;
+#ifdef __sparc__
+void __op_gen_label1(){}
+void __op_gen_label2(){}
+void __op_gen_label3(){}
+#else
 int __op_gen_label1, __op_gen_label2, __op_gen_label3;
+#endif
 int __op_jmp0, __op_jmp1, __op_jmp2, __op_jmp3;

 #ifdef __i386__

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
  2005-05-24 12:20 Juergen Keil
@ 2005-05-24 15:14 ` Nardmann, Heiko
  0 siblings, 0 replies; 8+ messages in thread
From: Nardmann, Heiko @ 2005-05-24 15:14 UTC (permalink / raw)
  To: qemu-devel, Juergen Keil

[-- Attachment #1: Type: text/plain, Size: 2477 bytes --]

On Dienstag 24 Mai 2005 14:20, Juergen Keil wrote:
[snip]
> > ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o):
> > symbol __op_gen_label1: value 0x34c21f does not fit
> > ...
> > ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o):
> > symbol __op_gen_label1: value 0x34a0d3 does not fit
> >
> > collect2: ld returned 1 exit status
> >
> > Any idea what is happening here?
>
> Part of the problem is my GOTO_LABEL_PARAM macro for sparc, in
> dyngen-exec.h:
>
>     #define GOTO_LABEL_PARAM(n) asm volatile ("ba "
> ASM_NAME(__op_gen_label) #n ";nop")
>
>
> We have 22 bits in the branch instruction to encode a signed 32-bit word
> offset, relative to the current PC. The target address is always a
> multiple of 4, so the offset encoded in the branch instruction is an
> offset measured in 32-bit words.
>
>
> The sparc branch instructions cannot jump forward / backward more than
> 8 mbytes (2^21 * 4 = 8mbyte).
>
>
> What appears to be happening on your system is that the opcode
> templates from the code section for "target-i386/op.c" (these contain
> the "ba" branch instruction from the GOTO_LABEL_PARAM macro) jump to an
> integer variable that is allocated somewhere in the data or bss section
> (the "int __op_gen_label1" variable defined in dyngen.h), and the code
> & data section on your system are more than 8 mbytes apart.
>
>
> Apparently I had luck upto now, because on my solaris 10 sparc box there
> have been no such issues with R_SPARC_WDISP22 relocation errors.
>
> > ld: fatal: relocation error: R_SPARC_WDISP22: file libqemu.a(op.o):
> > symbol __op_gen_label1: value 0x34c21f does not fit
>
>   --> 0x34c21f * 4 = 13830268 = 13.8 mbytes
>
>
> I guess this can be fixed by moving the branch target "__op_gen_label1"
> from the data section to the code section.  A "size" on my sparc qemu
> binary reports a total code size of ~ 1 mbyte, so that there should be
> no issues with R_SPARC_WDISP22 overflows when both the branch instruction
> and the branch target are both in the code (.text) section.
>
[snip]

Although I do not fully understand your explanation ... it works now with your 
patch.

Thanks!

Does this stuff go into CVS?

-- 
Heiko Nardmann (Dipl.-Ing. Technische Informatik)
secunet Security Networks AG - Sicherheit in Netzwerken (www.secunet.de),
Weidenauer Str. 223-225, D-57076 Siegen
Tel. : +49 271 48950-13, Fax  : +49 271 48950-50

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Building qemu on UltraSparc
  2005-05-22  0:13   ` Jérôme Warnier
@ 2005-09-04  1:13     ` Jérôme Warnier
  0 siblings, 0 replies; 8+ messages in thread
From: Jérôme Warnier @ 2005-09-04  1:13 UTC (permalink / raw)
  To: List qemu-devel

Le dimanche 22 mai 2005 à 02:13 +0200, Jérôme Warnier a écrit :
> Le dimanche 22 mai 2005 à 01:26 +0200, Herbert Poetzl a écrit :
> > On Sat, May 21, 2005 at 07:32:11PM +0200, Jérôme Warnier wrote:
> > > I'm trying to build qEmu v0.7.0 on Debian Sarge on a Sparc64 machine,
> > > and it fails with strange errors.
> > > Does anybody here have any idea to help me achieve it?
> > 
> > well, looks like you hit 32 vs 64 bit issues here, don't know
> > the details about the sparc/64 support but I'd try to build
> > as sparc32 first and see how far that gets ...
> I tried that (starting with utility sparc32), and it even fails faster.
> See the log attached.

The same error still happens with 0.7.1.

> > HTH,
> > Herbert
> 
> > > I attach the log of the build to this mail.
> > > 
> > > Thanks
> 
> Thanks for your help.
> 
> [..]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-09-04  1:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-21 17:32 [Qemu-devel] Building qemu on UltraSparc Jérôme Warnier
2005-05-21 23:26 ` Herbert Poetzl
2005-05-22  0:13   ` Jérôme Warnier
2005-09-04  1:13     ` Jérôme Warnier
  -- strict thread matches above, loose matches on Subject: below --
2005-05-23  8:38 Juergen Keil
2005-05-24 10:58 ` Nardmann, Heiko
2005-05-24 12:20 Juergen Keil
2005-05-24 15:14 ` Nardmann, Heiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).