From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [patch] Configure check for gcc4
Date: Wed, 2 Nov 2005 16:00:24 +0000 [thread overview]
Message-ID: <200511021600.26160.paul@codesourcery.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
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
[-- Attachment #2: patch.qemu_nogcc4 --]
[-- Type: text/x-diff, Size: 995 bytes --]
=== 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 <<EOF
+#if __GNUC__ >= 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
next reply other threads:[~2005-11-02 16:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-02 16:00 Paul Brook [this message]
2005-11-02 16:25 ` [Qemu-devel] [patch] Configure check for gcc4 Jan Marten Simons
2005-11-02 17:10 ` Sylvain Petreolle
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=200511021600.26160.paul@codesourcery.com \
--to=paul@codesourcery.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.