Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-07 Thread Alex Beregszaszi
Hi,

 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.

I just noticed in the block.c code that it uses pread and pwrite all
around the code, which, at least the man page states, reads from an
offset specified. While it does that, you still left the lseek there. Is
that for a reason? And why are you using pread instead the good old
read?

Imho if pread is faster, there should be an USE_PREAD macro, which would
be set true on Solaris, while making the use of it for other systems
possible.

-- 
Alex Beregszaszie-mail: [EMAIL PROTECTED]
Free Software Network   cell: +36 70 3144424


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


Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-06 Thread Juergen Keil


 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.



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


Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-06 Thread Ben Taylor
Juergen Keil [EMAIL PROTECTED] 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




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


Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-06 Thread Ben Taylor
Juergen Keil [EMAIL PROTECTED]
 
 
 
  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



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


Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-02 Thread Nardmann, Heiko
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 compilergcc
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
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)
/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'
/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 

Re: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)

2005-05-02 Thread Juergen Keil


 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

...



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