Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JCMUA-0005Q9-HC for qemu-devel@nongnu.org; Tue, 08 Jan 2008 16:59:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JCMU5-0005HM-1C for qemu-devel@nongnu.org; Tue, 08 Jan 2008 16:59:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JCMU4-0005GI-JI for qemu-devel@nongnu.org; Tue, 08 Jan 2008 16:59:44 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JCMU4-0007iI-AE for qemu-devel@nongnu.org; Tue, 08 Jan 2008 16:59:44 -0500 Message-Id: <69FB0F4B-B874-46B1-AF5B-4549F004ABC4@web.de> From: =?ISO-8859-1?Q?Andreas_F=E4rber?= In-Reply-To: <200801081039.m08AdAbi026333@imap.tools.intra> Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v915) Subject: Re: [Qemu-devel] Configuring qemu on Solaris Date: Tue, 8 Jan 2008 22:59:21 +0100 References: <200801081039.m08AdAbi026333@imap.tools.intra> Sender: andreas.faerber@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Am 08.01.2008 um 11:39 schrieb Juergen Keil: > > Andreas F=E4rber wrote: > >> The following part of configure is triggered on a fully-updated >> Solaris 10 8/07 amd64: >> >> # >> # 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 >> 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 >> correctly." >> echo "please get gcc-3.4.3 or later, from www.blastwave.org >> using pkg-get -i gcc3" >> echo "or get the latest patch from SunSolve for gcc" >> exit 1 >> fi >> fi >> >> Depending on the path of gcc, configure bails out. The text appears =20= >> to >> indicate that "the latest patch [...] for gcc", whichever that may =20= >> be, >> fixes some compilation issue. >> Since the script does not try to detect the presence of such a patch, >> 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 >> gcc version is in order to make this conditional? The system gcc >> version is 3.4.3 here and it appears to compile fine. > > 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 =20= > x86 > binary), but would crash at run time. > > > The problematic version of gcc refused to eliminate the frame pointer > for a function like this: > > =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 > > jmp_buf env; > > 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 > > % /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)" > > =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 > > > I'm not sure if there is actually a patch id that we could check for > in "showrev -p" output. > > > But maybe the configure script could look at "gcc --version" output; > I guess if it finds "(csl-sol210-3_4-branch+sol_rpath)", configure =20 > should > complain. Solaris 10 8/07 has exactly that gcc --version string and exhibits the =20= behavior described above, so it does seem there is no patch to apply. =20= Thanks for providing these detailed steps. Unfortunately QEMU unconditionally attempts to compile with -m64 on =20 amd64, and the alternative CSW and SFW GCC versions didn't allow that =20= last time I checked. The behavior I'm seeing is that sparc-softmmu boots Linux fine until =20 just before the login prompt and then hangs there, i386-softmmu =20 doesn't even get to the BIOS (no crashes). Andreas=