From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ElY5F-00024g-2O for qemu-devel@nongnu.org; Sun, 11 Dec 2005 15:46:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ElY5E-00023N-AE for qemu-devel@nongnu.org; Sun, 11 Dec 2005 15:46:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElY5E-00023D-70 for qemu-devel@nongnu.org; Sun, 11 Dec 2005 15:46:12 -0500 Received: from [217.13.200.26] (helo=mail6.worldserver.net) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1ElY6p-0005Nj-Do for qemu-devel@nongnu.org; Sun, 11 Dec 2005 15:47:51 -0500 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <2891E47F-E788-4FFD-8FCE-2F9C78C41CDE@kberg.ch> References: <0BE5F4F1-1337-43E6-AD37-ED47FCE3BDCB@stud.tu-ilmenau.de> <0BF839A5-2D32-44FD-9E19-B3EEFA3721E7@kberg.ch> <8B6EFA45-DC47-47FC-91B0-9B5CB41808D2@kberg.ch> <57692F3D-3487-48EB-AA0C-43124745EF3E@stud.tu-ilmenau.de> <2891E47F-E788-4FFD-8FCE-2F9C78C41CDE@kberg.ch> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Joachim Henke Subject: Re: [Qemu-devel] Mac OS X issues Date: Sun, 11 Dec 2005 21:47:00 +0100 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 > gcc4 and -fno-tree-ch did the trick for me, too. > -fno-tree-ch was mentioned earlyer on this list, to compile with > gcc4 on OS X. But since gcc4 is still not in the default toolchain, > I did not even try :(. > > Seams that we have a problem with gcc3.3 and not gcc4 for once :) > The error behavement is similar on your machine. I also got bus > error (Sometimes it did not reach the menu, too. I started to hit > the 3 very early, so I could go right thru it... Early crashes > always happened for me on MS-DOS 6.22 and DOS 7. > > Tested it with DOS 6.22 and DOS 7 (win95). No Problems so far. In the meanwhile I tracked down the whole thing a little bit. Debugging with GDB returns these messages when qemu (pure GCC3 build) crashes: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000034 0x000621e0 in tb_invalidate_phys_page_range (start=630485, end=630486, is_cpu_write_access=1) at /Volumes/Data/build/qemu/exec.c:491 491 tb2 = tb1->jmp_next[n1]; So one could assume that the problem is in exec.c - but some more compiling tests have shown, that GCC4 is required _only_ for cpu- exec.c. All other source files can be build with GCC3 and qemu will still run stable on Mac OS X (such a mixed build is probably faster than a pure GCC4 build). I feel indeed that the problem is somewhere in cpu-exec.c or one of its includes - maybe they init the data that exec.c crashes on. Hopefully I'm a bit luckier to find it tomorrow. > I hope Fabrice stumbles upon this. > > Maybe we should make the Patch a little more selective with "ifeq ($ > (CONFIG_DARWIN),yes)" and post it. > Don't know whether this affects other Platforms, too... Yes, my patch was just a simple one for experimental purposes. It must not go into CVS since it breaks compilation with GCC3 or earlier. Despite the fact that GCC4 is required only for cpu-exec.c, I also think that building with GCC4 should be generally provided, since all emulated architectures compile cleanly with it (at least on Mac OS X). Instead of requiring --disable-gcc-check, the configure script could write the option HAVE_GCC4=yes to config-host.mak, if it detects GCC4. The warning message could be kept. Makefile.target can then decide which CFLAGS should be used. I could create such a patch if people agree. Jo.