All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] Configure check for gcc4
@ 2005-11-02 16:00 Paul Brook
  2005-11-02 16:25 ` Jan Marten Simons
  2005-11-02 17:10 ` Sylvain Petreolle
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Brook @ 2005-11-02 16:00 UTC (permalink / raw)
  To: qemu-devel

[-- 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
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [patch] Configure check for gcc4
  2005-11-02 16:00 [Qemu-devel] [patch] Configure check for gcc4 Paul Brook
@ 2005-11-02 16:25 ` Jan Marten Simons
  2005-11-02 17:10 ` Sylvain Petreolle
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Marten Simons @ 2005-11-02 16:25 UTC (permalink / raw)
  To: qemu-devel

Paul Brook wrote:

>+    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
>  
>

Just a little typo:

+        echo "It is recommended that you use gcc 3.x to build QEMU"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Qemu-devel] [patch] Configure check for gcc4
  2005-11-02 16:00 [Qemu-devel] [patch] Configure check for gcc4 Paul Brook
  2005-11-02 16:25 ` Jan Marten Simons
@ 2005-11-02 17:10 ` Sylvain Petreolle
  1 sibling, 0 replies; 3+ messages in thread
From: Sylvain Petreolle @ 2005-11-02 17:10 UTC (permalink / raw)
  To: qemu-devel

I waited this moment since months.
+1 !
--- Paul Brook <paul@codesourcery.com> a écrit :

> 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.


Kind regards,
Sylvain Petreolle (aka Usurp)
--- --- --- --- --- --- --- --- --- --- --- --- ---
Tired of a proprietary Windows on your computer ?
Use free ReactOS instead ( http://www.reactos.org )

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-02 17:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-02 16:00 [Qemu-devel] [patch] Configure check for gcc4 Paul Brook
2005-11-02 16:25 ` Jan Marten Simons
2005-11-02 17:10 ` Sylvain Petreolle

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.