Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hp9aS-0005lg-CO for qemu-devel@nongnu.org; Fri, 18 May 2007 17:02:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hp9aO-0005gc-Jj for qemu-devel@nongnu.org; Fri, 18 May 2007 17:02:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hp9aO-0005gO-8v for qemu-devel@nongnu.org; Fri, 18 May 2007 17:02:04 -0400 Received: from eastrmmtao102.cox.net ([68.230.240.8]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hp9aN-0001RK-N0 for qemu-devel@nongnu.org; Fri, 18 May 2007 17:02:03 -0400 Message-ID: <19279691.1179522122190.JavaMail.root@eastrmwml26.mgt.cox.net> Date: Fri, 18 May 2007 17:02:02 -0400 From: Ben Taylor MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8494_10095227.1179522122153" Subject: [Qemu-devel] support 64-bit compile on Solaris 10/X86 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: qemu-devel@nongnu.org ------=_Part_8494_10095227.1179522122153 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit This set of patches allows 64-bit Solaris 10/11 X86 to compile qemu in a 64bit environment. It requires a 64-bit libsdl, but has been tested with all the tests (sparc, arm, mips, mipsel, linux-i386, and DamnSmallLinux) Ben ------=_Part_8494_10095227.1179522122153 Content-Type: text/x-patch; name=qemu-solaris-x64.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=qemu-solaris-x64.diff --- qemu.ORIG/Makefile.target 2007-05-16 07:59:39.000000000 -0400 +++ qemu/Makefile.target 2007-05-18 10:21:33.498971000 -0400 @@ -120,7 +120,10 @@ endif ifeq ($(ARCH),x86_64) -BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + BASE_LDFLAGS+=-m64 + ifneq ($(CONFIG_SOLARIS),yes) + BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + endif endif ifeq ($(ARCH),ppc) @@ -518,6 +521,13 @@ endif endif +ifeq ($(ARCH),x86_64) + VL_LDFLAGS+=-m64 + ifneq ($(CONFIG_SOLARIS),yes) + VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld + endif +endif + ifdef CONFIG_WIN32 SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole endif --- qemu.ORIG/configure 2007-05-13 14:02:43.000000000 -0400 +++ qemu/configure 2007-05-18 10:29:17.151695000 -0400 @@ -141,6 +141,12 @@ install="ginstall" needs_libsunmath="no" solarisrev=`uname -r | cut -f2 -d.` + # have to select again, because `uname -m` returns i86pc + # even on an x86_64 box. + solariscpu=`isainfo -k` + if test "${solariscpu}" = "amd64" ; then + cpu="x86_64" + fi if [ "$cpu" = "i386" -o "$cpu" = "x86_64" ] ; then if test "$solarisrev" -le 9 ; then if test -f /opt/SUNWspro/prod/lib/libsunmath.so.1; then @@ -317,6 +323,11 @@ ;; esac +if [ "$solaris" = "yes" -a "$cpu" = "x86_64" ] ; then + CFLAGS="${CFLAGS} -m64" + OS_CFLAGS="${OS_CFLAGS} -m64" +fi + if test x"$show_help" = x"yes" ; then cat << EOF @@ -547,7 +558,7 @@ int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } EOF -if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then +if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /dev/null ; then _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'` if test "$_sdlversion" -lt 121 ; then sdl_too_old=yes @@ -566,7 +577,7 @@ sdl_static_libs="$sdl_static_libs `aalib-config --static-libs`" fi -if $cc -o $TMPE `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then +if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC $sdl_static_libs 2> /dev/null; then sdl_static=yes fi ------=_Part_8494_10095227.1179522122153--