qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ben Taylor <sol10x86@cox.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] support 64-bit compile on Solaris 10/X86
Date: Fri, 18 May 2007 17:02:02 -0400	[thread overview]
Message-ID: <19279691.1179522122190.JavaMail.root@eastrmwml26.mgt.cox.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 227 bytes --]


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


[-- Attachment #2: qemu-solaris-x64.diff --]
[-- Type: text/x-patch, Size: 2207 bytes --]

--- 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
 

                 reply	other threads:[~2007-05-18 21:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19279691.1179522122190.JavaMail.root@eastrmwml26.mgt.cox.net \
    --to=sol10x86@cox.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).