From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EXL2O-0005Qs-DT for qemu-devel@nongnu.org; Wed, 02 Nov 2005 11:00:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EXL2M-0005Pi-Gj for qemu-devel@nongnu.org; Wed, 02 Nov 2005 11:00:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXL2M-0005PZ-54 for qemu-devel@nongnu.org; Wed, 02 Nov 2005 11:00:30 -0500 Received: from [65.74.133.11] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EXL2L-0006dk-Lz for qemu-devel@nongnu.org; Wed, 02 Nov 2005 11:00:30 -0500 From: Paul Brook Date: Wed, 2 Nov 2005 16:00:24 +0000 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_aKOaDt8XASg8jmJ" Message-Id: <200511021600.26160.paul@codesourcery.com> Subject: [Qemu-devel] [patch] Configure check for gcc4 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --Boundary-00=_aKOaDt8XASg8jmJ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Qemu is known to not build properly with gcc4. Despite this being documented in several places users frequent still get it wrong. This is probably the second most frequent question (the first, equally dumb problem being "I can't make ping work with -user-net"). The attached patch adds a configure check for gcc4. Paul --Boundary-00=_aKOaDt8XASg8jmJ Content-Type: text/x-diff; charset="us-ascii"; name="patch.qemu_nogcc4" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch.qemu_nogcc4" === configure ================================================================== --- configure (revision 1789) +++ configure (local) @@ -88,6 +88,7 @@ kernel_path="" cocoa="no" check_gfx="yes" +check_gcc="yes" # OS specific targetos=`uname -s` @@ -200,6 +201,8 @@ ;; --disable-gfx-check) check_gfx="no" ;; + --disable-gcc-check) check_gcc="no" + ;; esac done @@ -277,6 +280,23 @@ have_gcc3_options="yes" fi +# Check for gcc4 +if test "$check_gcc" = "yes" ; then + cat > $TMPC <= 4 +#error gcc4 +#endif +int main(){return 0;} +EOF + if ! $cc -o $TMPO $TMPC 2>/dev/null ; then + echo "ERROR: \"$cc\" looks like gcc 4.x" + echo "QEMU is known to have problems when compiled with gcc 4.x" + echo "It is recommended they you use gcc 3.x to build QEMU" + echo "To use this compiler anyway, configure with --disable-gcc-check" + exit 1; + fi +fi + ########################################## # SDL probe --Boundary-00=_aKOaDt8XASg8jmJ--