Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCR1U-0008R7-EZ for qemu-devel@nongnu.org; Tue, 08 Jan 2008 21:50:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCR1R-0008Qq-VF for qemu-devel@nongnu.org; Tue, 08 Jan 2008 21:50:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCR1R-0008Qn-S1 for qemu-devel@nongnu.org; Tue, 08 Jan 2008 21:50:29 -0500 Received: from eastrmmtao101.cox.net ([68.230.240.7]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCR1R-0003cG-HC for qemu-devel@nongnu.org; Tue, 08 Jan 2008 21:50:29 -0500 Message-ID: <20080108215029.ZRLHO.258931.root@eastrmwml12> Date: Tue, 8 Jan 2008 21:50:29 -0500 From: Ben Taylor Subject: Re: [Qemu-devel] Configuring qemu on Solaris In-Reply-To: <200801081039.m08AdAbi026333@imap.tools.intra> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juergen Keil , qemu-devel@nongnu.org ---- Juergen Keil wrote:=20 >=20 > Andreas F=C3=A4rber wrote: >=20 > > The following part of configure is triggered on a fully-updated =20 > > Solaris 10 8/07 amd64: > >=20 > > # > > # Solaris specific configure tool chain decisions > > # > > if test "$solaris" =3D "yes" ; then > > # > > # gcc for solaris 10/fcs in /usr/sfw/bin doesn't compile qemu =20 > > correctly > > # override the check with --disable-gcc-check > > # > > if test "$solarisrev" -eq 10 -a "$check_gcc" =3D "yes" ; then > > solgcc=3D`which $cc` > > if test "$solgcc" =3D "/usr/sfw/bin/gcc" ; then > > echo "Solaris 10/FCS gcc in /usr/sfw/bin will not compiled qemu = =20 > > correctly." > > echo "please get gcc-3.4.3 or later, from www.blastwave.org =20 > > using pkg-get -i gcc3" > > echo "or get the latest patch from SunSolve for gcc" > > exit 1 > > fi > > fi > >=20 > > Depending on the path of gcc, configure bails out. The text appears to = =20 > > indicate that "the latest patch [...] for gcc", whichever that may be, = =20 > > fixes some compilation issue. > > Since the script does not try to detect the presence of such a patch, = =20 > > can we remove the exit and keep the text as a warning only? > > Or can someone comment on what the corresponding Solaris patch id or = =20 > > gcc version is in order to make this conditional? The system gcc =20 > > version is 3.4.3 here and it appears to compile fine. >=20 > IIRC, problem was a code generation issue with the specific version of > gcc 3.4.3 (includes some patches from Sun; /usr/sfw/bin/gcc) that is > included with Solaris 10 x86. qemu would compile just fine (32-bit x86 > binary), but would crash at run time. >=20 >=20 > The problematic version of gcc refused to eliminate the frame pointer > for a function like this: >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > #include >=20 > jmp_buf env; >=20 > void > func(void) > { > longjmp(env, 1); > } > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 > % /usr/sfw/bin/gcc -O2 -fomit-frame-pointer -S xx.c > % cat xx.s > .file "xx.c" > .text > .p2align 2,,3 > .globl func > .type func, @function > func: > pushl %ebp <<<<<<<<<<<<<<<<<<<<<<< > movl %esp, %ebp <<<<<<<<<<<<<<<<<<<<<<< > subl $16, %esp > pushl $1 > pushl $env > call longjmp > .size func, .-func > .comm env,40,32 > .ident "GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)" >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 > I'm not sure if there is actually a patch id that we could check for > in "showrev -p" output. >=20 >=20 > But maybe the configure script could look at "gcc --version" output; > I guess if it finds "(csl-sol210-3_4-branch+sol_rpath)", configure should > complain. =20 >=20 > Current opensolaris comes with "gcc (GCC) 3.4.3 (csl-sol210-3_4-20050802)= ", > and this version eliminates the frame pointer in the above sample code, > and is able to compile a working qemu 32-bit x86 binary. I'll look at writing the code to handle this. I will need someone to test for me since I'm on S10U4 and Solaris Express B80...