[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] Don't require GCC3 unless necessary
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH] Don't require GCC3 unless necessary |
Date: |
Wed, 21 May 2008 15:40:59 -0500 |
Now that i386, x86_64, and arm are converted to TCG, we should not insist on
requiring GCC3 unless we're building a target that still requires dyngen.
If we're using some targets that do require GCC3 and some that don't, always
use GCC3 to ensure a consistent build.
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/Makefile b/Makefile
index 5bf9bbd..6505f0e 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,11 @@ LIBS+=$(AIOLIBS)
all: $(TOOLS) $(DOCS) recurse-all
-subdir-%: dyngen$(EXESUF) libqemu_common.a
+ifeq ($(CONFIG_DYNGEN), yes)
+SUBDIR_DEP=dyngen$(EXESUF)
+endif
+
+subdir-%: $(SUBDIR_DEP) libqemu_common.a
$(MAKE) -C $(subst subdir-,,$@) all
recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
diff --git a/configure b/configure
index 6b84f20..68ae4a9 100755
--- a/configure
+++ b/configure
@@ -461,6 +461,37 @@ if test "$mingw32" = "yes" ; then
oss="no"
fi
+# If --target-list isn't specified, we need dyngen
+if [ "$target_list" == "" ]; then
+ dyngen="yes"
+else
+ dyngen="no"
+fi
+
+# Check if any targets require dyngen
+for target in $target_list; do
+ target_cpu=`echo $target | cut -d '-' -f 1`
+ [ "$target_cpu" = "alpha" ] && dyngen="yes"
+ [ "$target_cpu" = "m68k" ] && dyngen="yes"
+ [ "$target_cpu" = "mips" ] && dyngen="yes"
+ [ "$target_cpu" = "mipsel" ] && dyngen="yes"
+ [ "$target_cpu" = "mipsn32" ] && dyngen="yes"
+ [ "$target_cpu" = "mipsn32el" ] && dyngen="yes"
+ [ "$target_cpu" = "mips64" ] && dyngen="yes"
+ [ "$target_cpu" = "mips64el" ] && dyngen="yes"
+ [ "$target_cpu" = "ppc" ] && dyngen="yes"
+ [ "$target_cpu" = "ppcemb" ] && dyngen="yes"
+ [ "$target_cpu" = "ppc64" ] && dyngen="yes"
+ [ "$target_cpu" = "ppc64abi32" ] && dyngen="yes"
+ [ "$target_cpu" = "sh4" ] && dyngen="yes"
+ [ "$target_cpu" = "she4eb" ] && dyngen="yes"
+done
+
+# If no targets require dyngen, use default CC instead of gcc3
+if [ "$dyngen" = "no" ]; then
+ check_gcc="no"
+fi
+
# Check for gcc4, error if pre-gcc4
if test "$check_gcc" = "yes" ; then
cat > $TMPC <<EOF
@@ -885,6 +916,7 @@ echo "CFLAGS=$CFLAGS" >> $config_mak
echo "LDFLAGS=$LDFLAGS" >> $config_mak
echo "EXESUF=$EXESUF" >> $config_mak
echo "AIOLIBS=$AIOLIBS" >> $config_mak
+echo "CONFIG_DYNGEN=$dyngen" >> $config_mak
case "$cpu" in
i386)
echo "ARCH=i386" >> $config_mak
@@ -1200,11 +1232,12 @@ case "$target_cpu" in
echo "#define USE_KQEMU 1" >> $config_h
fi
gcc3minver=`$cc --version 2> /dev/null| fgrep "(GCC) 3." | awk '{ print $3
}' | cut -f2 -d.`
- if test -n "$gcc3minver" -a $gcc3minver -gt 3
- then
- echo "HAVE_GT_GCC_3_3=true" >> $config_mak
- else
- echo "HAVE_GT_GCC_3_3=false" >> $config_mak
+ if test -n "$gcc3minver" ; then
+ if test -a "$gcc3minver" -gt 3 ; then
+ echo "HAVE_GT_GCC_3_3=true" >> $config_mak
+ else
+ echo "HAVE_GT_GCC_3_3=false" >> $config_mak
+ fi
fi
;;
x86_64)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] Don't require GCC3 unless necessary,
Anthony Liguori <=