Skip to contentSkip to conversation

Don't build option roms on Mac OS X

PATCH New Alexander Graf 2 participants 2 messages Jul 17, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't build option roms on Mac OS X

Mac OS X ships with a pretty broken assembler, so it can't build the multiboot option rom.

Let's disable option rom compilation for Mac OS X.

---
 configure |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
configure +9 -0
index edabe8d..efded55 100755
@@ -204,6 +204,7 @@ sdl="yes"
 sdl_x11="no"
 xen="yes"
 pkgversion=""
+broken_asm=""
 
 # OS specific
 if check_define __linux__ ; then
@@ -289,6 +290,8 @@ cocoa="yes"
 audio_drv_list="coreaudio"
 audio_possible_drivers="coreaudio sdl fmod"
 OS_LDFLAGS="-framework CoreFoundation -framework IOKit"
+# Mac OS X ships with an utterly broken assembler
+broken_asm=yes
 ;;
 SunOS)
     solaris="yes"
@@ -1827,6 +1830,12 @@ roms=
 if test "$cpu" = "i386" -o "$cpu" = "x86_64" ; then
   roms="pc-bios/optionrom"
 fi
+
+# Some systems (namely Mac OS X) have a broken assembler, so they
+# can't build option roms. Disable them for those.
+if test "$broken_asm" = "yes" ; then
+  roms=
+fi
 echo "ROMS=$roms" >> $config_host_mak
 
 if test -f ${config_host_h}~ ; then
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH 1/1 Don't build option roms on Mac OS X

From: Juan Quintela <[email protected]>

Hi Alex

Do you mean to use this other patch?
It avoids the use of a new variable to achieve exactly the same thing. I am cleaning up configure, and removing the not needed variables.

Thanks, Juan.

---
 configure |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
configure +3 -1
index ff241d9..6f8abb0 100755
@@ -1831,8 +1831,10 @@ if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
 fi
 echo "TOOLS=$tools" >> $config_host_mak
 
+# Mac OS X ships with a broken assembler
 roms=
-if test "$cpu" = "i386" -o "$cpu" = "x86_64" ; then
+if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
+        "$targetos" != "Darwin" ; then
   roms="pc-bios/optionrom"
 fi
 echo "ROMS=$roms" >> $config_host_mak
Signature · 1 line
1.6.2.5