From owner-freebsd-emulation@FreeBSD.ORG Fri Apr 15 21:14:01 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 72FB216A4CE; Fri, 15 Apr 2005 21:14:01 +0000 (GMT) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id E40C943D5D; Fri, 15 Apr 2005 21:13:57 +0000 (GMT) (envelope-from jkim@niksun.com) Received: from [10.70.0.244] (daemon.mj.niksun.com [10.70.0.244]) by anuket.mj.niksun.com (8.13.1/8.12.11) with ESMTP id j3FLDuIT000836; Fri, 15 Apr 2005 17:13:57 -0400 (EDT) (envelope-from jkim@niksun.com) From: Jung-uk Kim Organization: Niksun, Inc. To: Juergen Lock Date: Fri, 15 Apr 2005 17:13:54 -0400 User-Agent: KMail/1.6.2 References: <200504131635.26063.jkim@niksun.com> <20050415215142.A68957@saturn.kn-bremen.de> In-Reply-To: <20050415215142.A68957@saturn.kn-bremen.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200504151713.54185.jkim@niksun.com> X-Virus-Scanned: ClamAV version 0.83, clamav-milter version 0.83 on anuket.mj.niksun.com X-Virus-Status: Clean cc: freebsd-emulation@freebsd.org cc: freebsd-amd64@freebsd.org Subject: Re: QEMU on FreeBSD/amd64 (patches) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2005 21:14:01 -0000 On Friday 15 April 2005 03:51 pm, Juergen Lock wrote: > On Wed, Apr 13, 2005 at 04:35:26PM -0400, Jung-uk Kim wrote: > > I finally manage to build QEMU snapshot on FreeBSD/amd64 > > 6-CURRENT. > > Nice! > > > There's ports/emulators/qemu but it doesn't build on AMD64 for > > several reasons, i. e., QEMU and FreeBSD are both fast moving > > targets (esp. src/lib/msun), some long double math functions > > don't exist on FreeBSD, > > So the replacements in files/patch-aa in the port didnt work for > amd64? (the ones #if defined(_BSD) && defined(USE_X86LDOUBLE)) Correct. > > GCC in base system doesn't build QEMU because of several > > optimization bugs specific to AMD64, etc. > > > > 1. Install GCC 3.4 from ports. > > > > Anything newer than 20050316 should work. (Theoretically you can > > use gcc40 newer than 20041127 but not verified. Actually I am > > using patched version of src/contrib/gcc. ;-) > > > > 2. Install following dependencies from ports: > > > > devel/gmake (of course) > > net/samba > > devel/sdl12 > > > > I believe samba is optional but sdl12 is not. It doesn't work > > without SDL because `-nographic' option is broken. I believe it > > is an upstream bug (related to FreeBSD's pty or termios, i. e., > > fail to get correct term size and segfault) but I couldn't > > pin-point the culprit yet. In fact, I didn't bother too much > > because SDL worked just fine. ;-) > > Samba is needed for the -smb option (export a local dir to > guest), if you don't use that you can omit samba thats true. Understood. > >[...] > > Note 2: qemu-libmath-amd64.diff contains C99 long double math > > functions taken from glibc-2.3.5 and modified for FreeBSD/amd64: > > > > http://ftp.gnu.org/gnu/glibc/ > > http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/?cvsroot=glibc > > > > rintl() sysdeps/i386/fpu/s_rintl.c > > atan2l() sysdeps/i386/fpu/e_atan2l.c > > sqrtl() sysdeps/i386/fpu/e_sqrtl.c > > llrintl() sysdeps/x86_64/fpu/s_llrintl.S > > lrintl() sysdeps/x86_64/fpu/s_llrintl.S > > sinl() sysdeps/x86_64/fpu/s_sinl.S > > cosl() sysdeps/x86_64/fpu/s_cosl.S > > tanl() sysdeps/x86_64/fpu/s_tanl.S > > logl() sysdeps/x86_64/fpu/e_logl.S > > powl() sysdeps/x86_64/fpu/e_powl.S > > remainderl() sysdeps/x86_64/fpu/e_remainderl.S > > > > Just enough to compile QEMU snapshot until we complete C99 > > project. ;-) Similarly you can add other architectures under > > bsd/${MACHINE_ARCH}. > > So we need different versions of these for i386 hosts? Yes. > And how about 4.x i386 hosts? We need to add more #if's, of course. ;-) > Obviously the port should still run on those too. I know. I just wanted to tell people that it's possible. I will post a patch for those two cases when I find some free time. Thanks, Jung-uk Kim > Juergen