* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-02 10:46 Ben Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2005-05-02 10:46 UTC (permalink / raw)
To: Nardmann, Heiko, qemu-devel
"Nardmann, Heiko" <heiko.nardmann@secunet.com> wrote:
>
> I get the following error after running
>
> ./configure --prefix=$HOME/qemu-0.7.0.install
>
> Install prefix /home/nardmann/qemu-0.7.0.install
> BIOS directory /home/nardmann/qemu-0.7.0.install/share/qemu
> binary directory /home/nardmann/qemu-0.7.0.install/bin
> Manual directory /home/nardmann/qemu-0.7.0.install/share/man
> ELF interp prefix /usr/gnemul/qemu-%M
> Source path /home/nardmann/qemu-0.7.0
> C compiler gcc
> make gmake
> install ginstall
> host CPU sparc
> host big endian yes
> target list i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu
> gprof enabled no
> static build no
> SDL support yes
> SDL static link yes
> mingw32 support no
> Adlib support no
> FMOD support no
> OSS support no
> kqemu support no
>
>
>
> Then running make:
>
> for d in i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
> gmake -C $d all || exit 1 ; \
> done
> gmake[1]: Entering directory `/home/nardmann/qemu-0.7.0/i386-softmmu'
> gcc -Wall -O2 -g -fno-strict-aliasing -m32 -ffixed-g1 -ffixed-g2 -ffixed-g3
> -ffixed-g6 -I. -I/home/nardmann/qemu-0.7.0/target-i386
> -I/home/nardmann/qemu-0.7.0 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -I/home/nardmann/qemu-0.7.0/fpu
> -I/home/nardmann/qemu-0.7.0/slirp -c -o vl.o /home/nardmann/qemu-0.7.0/vl.c
> In file included from /home/nardmann/qemu-0.7.0/fpu/softfloat.h:394,
> from /home/nardmann/qemu-0.7.0/target-i386/cpu.h:41,
> from /home/nardmann/qemu-0.7.0/vl.h:73,
> from /home/nardmann/qemu-0.7.0/vl.c:24:
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:7:18: fenv.h: No such file or
> directory
If running Solaris, then you must be on Solaris 9,
since I have fenv.h in /usr/include on SOlaris 10,
and not on SOlaris 9. As I pointed out, the only
testing I did on Solaris was on 10.
> In file included from /home/nardmann/qemu-0.7.0/fpu/softfloat.h:394,
> from /home/nardmann/qemu-0.7.0/target-i386/cpu.h:41,
> from /home/nardmann/qemu-0.7.0/vl.h:73,
> from /home/nardmann/qemu-0.7.0/vl.c:24:
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:53: `FE_TONEAREST' undeclared
> here (not in a function)
This is in fenv.h, and so are all the other macros
that are left undefined. Not sure how we fix this,
other than pick up some of these defines manually.
Martin, given that you're doing the port for blastwave,
and I know they require both sparc/i386 support, how
did you get around this problem?
Ben
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:53: enumerator value for
> `float_round_nearest_even' not integer constant
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:54: `FE_DOWNWARD' undeclared
> here (not in a function)
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:54: enumerator value for
> `float_round_down' not integer constant
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:55: `FE_UPWARD' undeclared
> here (not in a function)
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:55: enumerator value for
> `float_round_up' not integer constant
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:57: `FE_TOWARDZERO'
> undeclared here (not in a function)
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:57: enumerator value for
> `float_round_to_zero' not integer constant
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h: In function `float32_abs':
> /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:164: warning: implicit
> declaration of function `fabsf'
All the above errors are fallout of fenv.h not being
included.
> /home/nardmann/qemu-0.7.0/vl.c: In function `init_timers':
> /home/nardmann/qemu-0.7.0/vl.c:986: warning: label `use_itimer' defined but
> not used
> /home/nardmann/qemu-0.7.0/vl.c: In function `net_slirp_smb':
> /home/nardmann/qemu-0.7.0/vl.c:1561: warning: int format, pid_t arg (arg 4)
> /home/nardmann/qemu-0.7.0/vl.c: In function `create_pidfile':
> /home/nardmann/qemu-0.7.0/vl.c:1759: warning: int format, pid_t arg (arg 3)
> /home/nardmann/qemu-0.7.0/vl.c: At top level:
> /home/nardmann/qemu-0.7.0/vl.c:914: warning: `start_rtc_timer' defined but not
> used
> gmake[1]: *** [vl.o] Error 1
> gmake[1]: Leaving directory `/home/nardmann/qemu-0.7.0/i386-softmmu'
> make: *** [all] Error 1
>
> Anyone with the same problem and already having a solution for it?
>
> On Donnerstag 28 April 2005 16:24, Ben Taylor wrote:
> > Please ignore the first post. A webmail annomally sent
> > the message before it was cooked. :-)
> >
> > This patch is mostly a collation of several sets of Solaris
> > host patches that have been around. Thanks to Juergen
> > and a few others for actually having done the hard work
> > of debugging and making things work.
> >
> > What the patch does:
> >
> > 1) deal with the fact that bash is not /bin/sh in Solaris
> > 2) Add defaults for Solaris in configure, and deal with
> > specific behaviors that Solaris doesn't support
> > (like ln -sf not overwriting the target)
> > 3) add --install= option to configure. Solaris's
> > /usr/bin/install is not what qemu expects to see.
> > Default is ginstall, but you can also use the full path
> > to /usr/ucb/install if you don't have Gnu Fileutils
> > installed. However, it's not a good ideas to put
> > /usr/ucb in front of /usr/bin:/usr/sbin. Modified
> > the Makefiles to use $(INSTALL)
> > 4) Added --with-oss= and --oss-inc= to allow the use of the
> > OSS audio driver in Solaris. It had been previosly
> > disabled. (SDL audio tends to stutter on Solaris)
> > 5) Add snippets of code in various place to make qemu
> > compile cleanly under Solaris.
> >
> > Two enhancements:
> > 1) ability to run with user-net if you don't have
> > a DNS server on the host
> > 2) some extra Samba features in vl.c, though I admit
> > to just importing them since I don't run Samba.
> >
> > On solaris, from above the qemu-0.7.0 directory, type
> >
> > gpatch -p0 < qemu-0.7.0-solaris-patch
> >
> > Notes: all of the work has been done on Solaris 10 or
> > Solaris express, using the blastwave gcc-3.4.3 compiler
> > and libSDL-1.2.8 from blastwave. I have seen reports
> > that gcc-3.4.3 in /usr/sfw/bin is broken for qemu
> > building.
> >
> > Ben
>
> --
> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-02 18:27 Juergen Keil
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Keil @ 2005-05-02 18:27 UTC (permalink / raw)
To: sol10x86, qemu-devel
> This is in fenv.h, and so are all the other macros
> that are left undefined. Not sure how we fix this,
> other than pick up some of these defines manually.
Use <ieeefp.h> [fpsetround(), fpgetround()] on Solaris, instead of <fenv.h>
[fegetround(), fesetround()] ?
One of the BSDs already does this (see fpu/softfloat-native.h):
#if defined(_BSD) && !defined(__APPLE__)
#include <ieeefp.h>
#else
#include <fenv.h>
#endif
...
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-06 20:21 Ben Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2005-05-06 20:21 UTC (permalink / raw)
To: Juergen Keil, qemu-devel, Heiko.Nardmann
Juergen Keil <jk@tools.de>
>
> > gcc-3.4.2 -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/nardmann/qemu-0.7.0/target-i386
> > - -I/home/nardmann/qemu-0.7.0 -I/opt/SUNWspro/prod/include/cc -D_GNU_SOURCE
> > - -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/nardmann/qemu-0.7.0/fpu
> > - -I/home/nardmann/qemu-0.7.0/slirp -c -o
> > op.o /home/nardmann/qemu-0.7.0/target-i386/op.c
> > In file included from /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:7,
> > from /home/nardmann/qemu-0.7.0/fpu/softfloat.h:394,
> > from /home/nardmann/qemu-0.7.0/target-i386/cpu.h:41,
> > from /home/nardmann/qemu-0.7.0/target-i386/exec.h:143,
> > from /home/nardmann/qemu-0.7.0/target-i386/op.c:22:
> > /opt/SUNWspro/prod/include/cc/fenv.h:8: warning: ignoring #pragma ident
> > In file included from /home/nardmann/qemu-0.7.0/fpu/softfloat.h:394,
> > from /home/nardmann/qemu-0.7.0/target-i386/cpu.h:41,
> > from /home/nardmann/qemu-0.7.0/target-i386/exec.h:143,
> > from /home/nardmann/qemu-0.7.0/target-i386/op.c:22:
> > /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h: In function `float32_abs':
> > /home/nardmann/qemu-0.7.0/fpu/softfloat-native.h:164: warning: implicit
> > declaration of function `fabsf'
> > In file included from /home/nardmann/qemu-0.7.0/target-i386/op.c:724:
> > /home/nardmann/qemu-0.7.0/target-i386/ops_template.h: In function
> > `op_jb_subb':
> > /home/nardmann/qemu-0.7.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_pavgw_xmm
I have retested on sparc (sol9), by adding some of the
defines in fenv.h for Solaris 10 to the gnu-c99-math.h
file you created, and the patches you posted, and now
I'm getting an error when I compile that looks like this:
for d in i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
gmake -C $d all || exit 1 ; \
done
gmake[1]: Entering directory `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
../dyngen -c -o opc.h op.o
dyngen: ret; restore; not found at end of op_fstt_ST0_A0
gmake[1]: *** [opc.h] Error 1
gmake[1]: Leaving directory `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
gmake: *** [all] Error 1
Ideas?
> >
> >
> >
> > I found that GOTO_LABEL_PARAM ist not defined for sparc in dyngen-exec.h; any
> > reason for this?
>
>
> I've fixed the 'bogus save' issue (and another sparc problem with
> incorrect C syntax generated by dyngen) with this patch:
>
> Index: dyngen.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/dyngen.c,v
> retrieving revision 1.40
> diff -u -B -r1.40 dyngen.c
> --- dyngen.c 27 Apr 2005 19:55:58 -0000 1.40
> +++ dyngen.c 2 May 2005 18:29:08 -0000
> @@ -1196,7 +1196,7 @@
> } else {
> #ifdef HOST_SPARC
> if (sym_name[0] == '.')
> - snprintf(name, sizeof(name),
> + snprintf(name, name_size,
> "(long)(&__dot_%s)",
> sym_name + 1);
> else
> @@ -1451,7 +1451,9 @@
> if ((start_insn & ~0x1fff) == 0x9de3a000) {
> p_start += 0x4;
> start_offset += 0x4;
> - if ((int)(start_insn | ~0x1fff) < -128)
> + // if ((int)(start_insn | ~0x1fff) < -128)
> + // Why -128? op_pavgb_xmm adjusts the stack by -0x110 == -272
> + if ((int)(start_insn | ~0x1fff) < -272)
> error("Found bogus save at the start of %s", name);
> if (end_insn1 != 0x81c7e008 || end_insn2 != 0x81e80000)
> error("ret; restore; not found at end of %s", name);
>
>
>
> The missing GOTO_LABEL_PARAM macro needs a patch like this:
>
> Index: dyngen-exec.h
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/dyngen-exec.h,v
> retrieving revision 1.25
> diff -u -B -r1.25 dyngen-exec.h
> --- dyngen-exec.h 24 Apr 2005 18:01:56 -0000 1.25
> +++ dyngen-exec.h 2 May 2005 18:29:07 -0000
> @@ -230,6 +237,8 @@
> #ifdef __sparc__
> #define EXIT_TB() asm volatile ("jmpl %i0 + 8, %g0\n" \
> "nop")
> +#define GOTO_LABEL_PARAM(n) asm volatile ( \
> + "set " ASM_NAME(__op_gen_label) #n ", %g1; jmp %g1; nop")
> #endif
> #ifdef __arm__
> #define EXIT_TB() asm volatile ("b exec_loop")
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-06 21:06 Juergen Keil
0 siblings, 0 replies; 6+ messages in thread
From: Juergen Keil @ 2005-05-06 21:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Heiko.Nardmann
> I have retested on sparc (sol9), by adding some of the
> defines in fenv.h for Solaris 10 to the gnu-c99-math.h
> file you created, and the patches you posted, and now
> I'm getting an error when I compile that looks like this:
>
> for d in i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
> gmake -C $d all || exit 1 ; \
> done
> gmake[1]: Entering directory
`/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> ../dyngen -c -o opc.h op.o
> dyngen: ret; restore; not found at end of op_fstt_ST0_A0
> gmake[1]: *** [opc.h] Error 1
> gmake[1]: Leaving directory
`/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> gmake: *** [all] Error 1
>
> Ideas?
Which compiler was used?
Disassemble the op_fstt_ST0_A0 function, using "dis -F op_fstt_ST0_A0 op.o".
My S10 sparc binary for op.o currently includes:
% dis -F op_fstt_ST0_A0 i386-softmmu/op.o
**** DISASSEMBLER ****
disassembly for i386-softmmu/op.o
section .text
op_fstt_ST0_A0()
op_fstt_ST0_A0: 9d e3 bf 90 save %sp, -0x70, %sp
op_fstt_ST0_A0+0x4: 40 00 00 00 call op_fstt_ST0_A0+0x4
op_fstt_ST0_A0+0x8: 01 00 00 00 nop
op_fstt_ST0_A0+0xc: 01 00 00 00 nop
op_fstt_ST0_A0+0x10: 81 c7 e0 08 ret
op_fstt_ST0_A0+0x14: 81 e8 00 00 restore
I've seen cases where gcc 3.4.x has compiled the op.o code templates into
"leaf" functions, and these are incompatible with dyngen. I think
some extra gnu cc CFLAGS for op.c (-fno-omit-frame-pointer) fix this problem.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-06 21:22 Ben Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2005-05-06 21:22 UTC (permalink / raw)
To: Juergen Keil, qemu-devel; +Cc: Heiko.Nardmann
Juergen Keil <jk@tools.de> wrote:
>
>
> > I have retested on sparc (sol9), by adding some of the
> > defines in fenv.h for Solaris 10 to the gnu-c99-math.h
> > file you created, and the patches you posted, and now
> > I'm getting an error when I compile that looks like this:
> >
> > for d in i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
> > gmake -C $d all || exit 1 ; \
> > done
> > gmake[1]: Entering directory
> `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> > ../dyngen -c -o opc.h op.o
> > dyngen: ret; restore; not found at end of op_fstt_ST0_A0
> > gmake[1]: *** [opc.h] Error 1
> > gmake[1]: Leaving directory
> `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> > gmake: *** [all] Error 1
> >
> > Ideas?
>
>
> Which compiler was used?
blastwave's gcc-3.4.3
>
> Disassemble the op_fstt_ST0_A0 function, using "dis -F op_fstt_ST0_A0 op.o".
>
> My S10 sparc binary for op.o currently includes:
>
> % dis -F op_fstt_ST0_A0 i386-softmmu/op.o
> **** DISASSEMBLER ****
>
>
> disassembly for i386-softmmu/op.o
>
> section .text
> op_fstt_ST0_A0()
> op_fstt_ST0_A0: 9d e3 bf 90 save %sp, -0x70, %sp
> op_fstt_ST0_A0+0x4: 40 00 00 00 call op_fstt_ST0_A0+0x4
> op_fstt_ST0_A0+0x8: 01 00 00 00 nop
> op_fstt_ST0_A0+0xc: 01 00 00 00 nop
> op_fstt_ST0_A0+0x10: 81 c7 e0 08 ret
> op_fstt_ST0_A0+0x14: 81 e8 00 00 restore
dis -F op_fstt_ST0_A0 i386-softmmu/op.o
**** DISASSEMBLER ****
disassembly for i386-softmmu/op.o
section .text
op_fstt_ST0_A0()
cfe4: 9d e3 bf 90 save %sp, -0x70, %sp
cfe8: 40 00 00 00 call 0xcfe8
cfec: 81 e8 00 00 restore
cff0: 01 00 00 00 nop
interesting.
> I've seen cases where gcc 3.4.x has compiled the op.o code templates into
> "leaf" functions, and these are incompatible with dyngen. I think
> some extra gnu cc CFLAGS for op.c (-fno-omit-frame-pointer) fix this problem.
added those with no effect. Do we need gas to do
this correctly? Blastwave's gcc uses sun's as and ld.
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
@ 2005-05-06 21:43 Ben Taylor
0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2005-05-06 21:43 UTC (permalink / raw)
To: Juergen Keil, qemu-devel; +Cc: Heiko.Nardmann
Juergen Keil <jk@tools.de>
>
>
>
> > I have retested on sparc (sol9), by adding some of the
> > defines in fenv.h for Solaris 10 to the gnu-c99-math.h
> > file you created, and the patches you posted, and now
> > I'm getting an error when I compile that looks like this:
> >
> > for d in i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu; do \
> > gmake -C $d all || exit 1 ; \
> > done
> > gmake[1]: Entering directory
> `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> > ../dyngen -c -o opc.h op.o
> > dyngen: ret; restore; not found at end of op_fstt_ST0_A0
> > gmake[1]: *** [opc.h] Error 1
> > gmake[1]: Leaving directory
> `/export/src/qemu-snapshot-2005-05-04_23-sol/i386-softmmu'
> > gmake: *** [all] Error 1
> >
> > Ideas?
>
>
> Which compiler was used?
>
> Disassemble the op_fstt_ST0_A0 function, using "dis -F op_fstt_ST0_A0 op.o".
>
> My S10 sparc binary for op.o currently includes:
>
> % dis -F op_fstt_ST0_A0 i386-softmmu/op.o
> **** DISASSEMBLER ****
>
>
> disassembly for i386-softmmu/op.o
>
> section .text
> op_fstt_ST0_A0()
> op_fstt_ST0_A0: 9d e3 bf 90 save %sp, -0x70, %sp
> op_fstt_ST0_A0+0x4: 40 00 00 00 call op_fstt_ST0_A0+0x4
> op_fstt_ST0_A0+0x8: 01 00 00 00 nop
> op_fstt_ST0_A0+0xc: 01 00 00 00 nop
> op_fstt_ST0_A0+0x10: 81 c7 e0 08 ret
> op_fstt_ST0_A0+0x14: 81 e8 00 00 restore
>
>
> I've seen cases where gcc 3.4.x has compiled the op.o code templates into
> "leaf" functions, and these are incompatible with dyngen. I think
> some extra gnu cc CFLAGS for op.c (-fno-omit-frame-pointer) fix this problem.
Mea culpa. It looks like I broke something (or managed
to get a non-gcc3 compiler in my path at configure time)
that allowed HAVE_GCC3_OPTIONS to not be set. When
I added the flag back in to config-host.mak, the compile
went the way it should have.
At least I know what to look for now.
Thanks,
Ben
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-05-06 21:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-02 18:27 Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real) Juergen Keil
-- strict thread matches above, loose matches on Subject: below --
2005-05-06 21:43 Ben Taylor
2005-05-06 21:22 Ben Taylor
2005-05-06 21:06 Juergen Keil
2005-05-06 20:21 Ben Taylor
2005-05-02 10:46 Ben Taylor
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).