qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Glauber Costa <glommer@gmail.com>,
	Anthony Liguori <aliguori@us.ibm.com>, Alex Graf <alex@csgraf.de>,
	Avi Kivity <avi@redhat.com>,
	Dustin Kirkland <kirkland@canonical.com>
Subject: [Qemu-devel] [PATCH 4/4] Allow tool chain to be specified for bios build
Date: Sun, 17 May 2009 10:29:01 -0500	[thread overview]
Message-ID: <1242574141-18488-5-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1242574141-18488-1-git-send-email-aliguori@us.ibm.com>

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 Makefile.target |    8 ++++++--
 configure       |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 2 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 567618b..7f67734 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -715,8 +715,12 @@ endif
 #  Per architecture ROMS
 ROMS=
 ifeq ($(TARGET_BASE_ARCH),i386)
+ifneq ($(BCC),)
+ifneq ($(GCC_I386),)
 ROMS+=gplbios vgabios
 endif
+endif
+endif
 
 vl.o: qemu-options.h
 
@@ -742,7 +746,7 @@ qemu-options.h: $(SRC_PATH)/qemu-options.hx
 roms:
 	@if test "$(ROMS)" ; then \
 	  for subdir in $(ROMS); do \
-	    $(MAKE) -C roms/$${subdir} VPATH=$(SRC_PATH)/roms/$${subdir} ;\
+	    $(MAKE) -C roms/$${subdir} VPATH=$(SRC_PATH)/roms/$${subdir} "BCC=$(BCC)" "GCC32=$(GCC_I386)";\
 	  done; \
 	fi
 
@@ -750,7 +754,7 @@ clean:
 	rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o qemu-options.h gdbstub-xml.c
 	rm -f *.d */*.d tcg/*.o
 	for subdir in $(ROMS); do \
-	    $(MAKE) -C $${subdir} clean \
+	    $(MAKE) -C roms/$${subdir} clean; \
 	done
 
 install: all
diff --git a/configure b/configure
index 29a13ca..6f9a152 100755
--- a/configure
+++ b/configure
@@ -194,6 +194,10 @@ fdt="yes"
 sdl_x11="no"
 xen="yes"
 pkgversion=""
+have_bcc="yes"
+bcc="bcc"
+have_gcc_i386="yes"
+gcc_i386="gcc -m32 -fno-stack-protector"
 
 # OS specific
 if check_define __linux__ ; then
@@ -1262,6 +1266,40 @@ if test "$rt" = "yes" ; then
   CLOCKLIBS="-lrt"
 fi
 
+# FIXME
+# check for iasl and as86
+
+#########################################
+# Check for BCC
+cat > $TMPC <<EOF
+int main(argc, argv) int argc; char **argv; { return 0; }
+EOF
+
+if test "$have_bcc" = "yes" ; then
+  if $bcc -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
+    :
+  else
+    have_bcc="no"
+  fi
+fi
+
+#########################################
+# Check for GCC on i386
+cat > $TMPC <<EOF
+#ifndef __i386__
+#error Not i386
+#endif
+int main(void) { return 0; }
+EOF
+
+if test "$have_gcc_i386" = "yes" ; then
+  if $gcc_i386 -o $TMPE $TMPC > /dev/null 2> /dev/null ; then
+    :
+  else
+    have_gcc_i386="no"
+  fi
+fi
+
 if test "$mingw32" = "yes" ; then
   if test -z "$prefix" ; then
       prefix="c:\\\\Program Files\\\\Qemu"
@@ -1714,6 +1752,14 @@ else
     exit 1
 fi
 
+if test "$have_bcc" = "yes" ; then
+    echo "BCC=$bcc" >> $config_mak
+fi
+
+if test "$have_gcc_i386" = "yes" ; then
+    echo "GCC_I386=$gcc_i386" >> $config_mak
+fi
+
 tools=
 if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
   tools="qemu-img\$(EXESUF) $tools"
-- 
1.6.2.5

      parent reply	other threads:[~2009-05-17 15:29 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-17 15:28 [Qemu-devel] [PATCH 0/4][RFC] Bring ROM source into tree via git submodules Anthony Liguori
2009-05-17 15:28 ` [Qemu-devel] [PATCH 1/4] Add GPL bios as a submodule Anthony Liguori
2009-05-17 15:43   ` [Qemu-devel] " Avi Kivity
2009-05-17 15:49     ` Anthony Liguori
2009-05-17 16:23       ` Avi Kivity
2009-05-17 17:51         ` Jamie Lokier
2009-05-17 18:03           ` Avi Kivity
2009-05-17 18:05           ` Stanislav
2009-05-17 18:11             ` Avi Kivity
2009-05-17 18:37               ` Stanislav
2009-05-17 19:07                 ` Avi Kivity
2009-05-17 22:12                   ` Carl-Daniel Hailfinger
2009-05-17 22:40                     ` Avi Kivity
2009-05-17 23:22                 ` Anthony Liguori
2009-05-18 15:20                   ` ron minnich
2009-05-18  2:40                 ` Kevin O'Connor
2009-05-17 23:13             ` Anthony Liguori
2009-05-18  4:22               ` Jamie Lokier
2009-05-25 13:04                 ` Carl-Daniel Hailfinger
2009-05-17 23:09         ` Anthony Liguori
2009-05-17 23:23           ` Avi Kivity
2009-05-17 23:31             ` Anthony Liguori
2009-05-17 23:40               ` Avi Kivity
2009-05-18  1:17                 ` Anthony Liguori
2009-05-18  5:48                   ` Avi Kivity
2009-05-17 17:10   ` Sebastian Herbszt
2009-05-17 15:28 ` [Qemu-devel] [PATCH 2/4] Add submodule for VGABios Anthony Liguori
2009-05-17 15:29 ` [Qemu-devel] [PATCH 3/4] Update makefile to build roms Anthony Liguori
2009-05-17 15:46   ` [Qemu-devel] " Avi Kivity
2009-05-17 15:47     ` Avi Kivity
2009-05-17 15:53     ` Anthony Liguori
2009-05-17 17:16       ` Avi Kivity
2009-05-17 23:10         ` Anthony Liguori
2009-05-17 22:04       ` Paul Brook
2009-05-17 23:28         ` Anthony Liguori
2009-05-17 23:43           ` Paul Brook
2009-05-18  1:18             ` Anthony Liguori
2009-05-18  4:24             ` Jamie Lokier
2009-05-18  8:25               ` Riku Voipio
2009-05-18  8:35                 ` Avi Kivity
2009-05-17 15:29 ` Anthony Liguori [this message]

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=1242574141-18488-5-git-send-email-aliguori@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=alex@csgraf.de \
    --cc=avi@redhat.com \
    --cc=glommer@gmail.com \
    --cc=kirkland@canonical.com \
    --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).