qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Solaris x86_64 configure patch
@ 2007-09-15 12:49 Ben Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Taylor @ 2007-09-15 12:49 UTC (permalink / raw)
  To: qemu-devel


By default, uname -i returns i86pc on i386 or x86_64 system.  This patch makes
it possible to for Solaris systems to get the right hardware type.

--- qemu.ORIG/configure 2007-08-24 21:37:51.000000000 -0400
+++ qemu/configure      2007-09-15 08:53:34.288345000 -0400
@@ -155,6 +155,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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Solaris x86_64 configure patch
@ 2007-09-15 13:00 Ben Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Taylor @ 2007-09-15 13:00 UTC (permalink / raw)
  To: qemu-devel


Corrected version of the patch.

--- qemu.ORIG/configure 2007-08-24 21:37:51.000000000 -0400
+++ qemu/configure      2007-09-15 09:07:47.928893000 -0400
@@ -155,6 +155,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
@@ -333,6 +339,16 @@
            ;;
 esac

+if [ "$solaris" = "yes" -a  "$cpu" = "x86_64" ] ; then
+    CFLAGS="${CFLAGS} -m64"
+    OS_CFLAGS="${OS_CFLAGS} -m64"
+fi
+
+if [ "$solaris" = "yes" -a  "$cpu" = "i386" ] ; then
+    CFLAGS="${CFLAGS} -m32"
+    OS_CFLAGS="${OS_CFLAGS} -m32"
+fi
+
 if test x"$show_help" = x"yes" ; then
 cat << EOF

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-15 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-15 12:49 [Qemu-devel] Solaris x86_64 configure patch Ben Taylor
  -- strict thread matches above, loose matches on Subject: below --
2007-09-15 13:00 Ben Taylor

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