Index: configure =================================================================== --- configure (revision 5030) +++ configure (working copy) @@ -468,40 +468,6 @@ oss="no" fi -# Check for gcc4, error if pre-gcc4 -if test "$check_gcc" = "yes" ; then - cat > $TMPC < /dev/null ; then - echo "WARNING: \"$cc\" looks like gcc 4.x" - found_compat_cc="no" - if test "$gcc3_search" = "yes" ; then - echo "Looking for gcc 3.x" - for compat_cc in $gcc3_list ; do - if "$cross_prefix$compat_cc" --version 2> /dev/null | fgrep '(GCC) 3.' > /dev/null 2>&1 ; then - echo "Found \"$compat_cc\"" - cc="$cross_prefix$compat_cc" - found_compat_cc="yes" - break - fi - done - if test "$found_compat_cc" = "no" ; then - echo "gcc 3.x not found!" - fi - fi - if test "$found_compat_cc" = "no" ; then - echo "QEMU is known to have problems when compiled with gcc 4.x" - echo "It is recommended that you use gcc 3.x to build QEMU" - echo "To use this compiler anyway, configure with --disable-gcc-check" - exit 1; - fi - fi -fi - # # Solaris specific configure tool chain decisions # @@ -1305,6 +1271,7 @@ bflt="no" elfload32="no" target_nptl="no" +requires_gcc3="no" interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_cpu/g"` echo "#define CONFIG_QEMU_PREFIX \"$interp_prefix1\"" >> $config_h @@ -1341,6 +1308,7 @@ echo "#define TARGET_ARCH \"alpha\"" >> $config_h echo "#define TARGET_ALPHA 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h + requires_gcc3="yes" ;; arm|armeb) echo "TARGET_ARCH=arm" >> $config_mak @@ -1385,6 +1353,7 @@ echo "#define TARGET_ARCH \"ppc\"" >> $config_h echo "#define TARGET_PPC 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h + requires_gcc3="yes" ;; ppcemb) echo "TARGET_ARCH=ppcemb" >> $config_mak @@ -1394,6 +1363,7 @@ echo "#define TARGET_PPC 1" >> $config_h echo "#define TARGET_PPCEMB 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h + requires_gcc3="yes" ;; ppc64) echo "TARGET_ARCH=ppc64" >> $config_mak @@ -1403,6 +1373,7 @@ echo "#define TARGET_PPC 1" >> $config_h echo "#define TARGET_PPC64 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h + requires_gcc3="yes" ;; ppc64abi32) echo "TARGET_ARCH=ppc64" >> $config_mak @@ -1414,6 +1385,7 @@ echo "#define TARGET_PPC64 1" >> $config_h echo "#define TARGET_ABI32 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h + requires_gcc3="yes" ;; sh4|sh4eb) echo "TARGET_ARCH=sh4" >> $config_mak @@ -1422,6 +1394,7 @@ echo "#define TARGET_SH4 1" >> $config_h echo "#define CONFIG_DYNGEN_OP 1" >> $config_h bflt="yes" + requires_gcc3="yes" ;; sparc) echo "TARGET_ARCH=sparc" >> $config_mak @@ -1503,6 +1476,44 @@ done # for target in $targets +if test "$requires_gcc3" = "no" ; then + check_gcc="no" +fi + +# Check for gcc4, error if pre-gcc4 +if test "$check_gcc" = "yes" ; then + cat > $TMPC < /dev/null ; then + echo "WARNING: \"$cc\" looks like gcc 4.x" + found_compat_cc="no" + if test "$gcc3_search" = "yes" ; then + echo "Looking for gcc 3.x" + for compat_cc in $gcc3_list ; do + if "$cross_prefix$compat_cc" --version 2> /dev/null | fgrep '(GCC) 3.' > /dev/null 2>&1 ; then + echo "Found \"$compat_cc\"" + cc="$cross_prefix$compat_cc" + found_compat_cc="yes" + break + fi + done + if test "$found_compat_cc" = "no" ; then + echo "gcc 3.x not found!" + fi + fi + if test "$found_compat_cc" = "no" ; then + echo "QEMU is known to have problems when compiled with gcc 4.x" + echo "It is recommended that you use gcc 3.x to build QEMU" + echo "To use this compiler anyway, configure with --disable-gcc-check" + exit 1; + fi + fi +fi + # build tree in object directory if source path is different from current one if test "$source_path_used" = "yes" ; then DIRS="tests tests/cris slirp audio"