Included are two small patches for configure and Makefile.target to 
allow QEMU to configure and build correctly on a Solaris x86-64 platform.

Ben
--- qemu.ORIG/configure 2007-09-29 21:58:31.000000000 -0400
+++ qemu/configure      2007-10-04 12:52:30.776801000 -0400
@@ -575,7 +575,7 @@
 #undef main /* We don't want SDL to override our main() */
 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> /tmp/qemu-$$-sdl-config.log ; then
+        if $cc -o $TMPE ${OS_CFLAGS} `$sdl_config --cflags 2> /dev/null` $TMPC `$sdl_config --libs 2> /dev/null` 2> /tmp/qemu-$$-sdl-config.log ; then
             _sdlversion=`$sdl_config --version | sed 's/[^0-9]//g'`
             if test "$_sdlversion" -lt 121 ; then
                 sdl_too_old=yes
@@ -594,7 +594,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
             fi # static link
--- qemu.ORIG/Makefile.target   2007-09-29 21:58:31.000000000 -0400
+++ qemu/Makefile.target        2007-10-04 12:56:59.655018000 -0400
@@ -129,7 +129,11 @@
 endif

 ifeq ($(ARCH),x86_64)
-BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
+  ifeq ($(CONFIG_SOLARIS),yes)
+    BASE_LDFLAG+=-m64
+  else
+    BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
+  endif
 endif

 ifeq ($(ARCH),ppc)
@@ -544,6 +548,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

Reply via email to