From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REMFA-000863-Ho for qemu-devel@nongnu.org; Thu, 13 Oct 2011 10:26:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REMF2-0000sr-4l for qemu-devel@nongnu.org; Thu, 13 Oct 2011 10:26:44 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57243 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REMF1-0000sj-TY for qemu-devel@nongnu.org; Thu, 13 Oct 2011 10:26:36 -0400 Message-ID: <4E96F51A.8080200@suse.de> Date: Thu, 13 Oct 2011 16:26:34 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1318436475-20691-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1318436475-20691-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] configure: Detect when glibc implements makecontext() to always fail List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org Am 12.10.2011 18:21, schrieb Peter Maydell: > Improve the configure test for presence of ucontext functions by > making linker warnings fatal; this allows us to detect when we are > linked with a glibc which implements makecontext() to always return > ENOSYS. > > Signed-off-by: Peter Maydell Tested-by: Andreas F=E4rber > --- > Compiling on an Ubuntu Natty ARM host will hit this. Works on Ubuntu Maverick ARM host as well. > (Anybody think we should clean up our configure tests so we can > enable -Werror and -Wl,--fatal-warnings on all of them?) In theory that would be nice. I noticed for example that a missing=20 glib2-devel package is not caught by configure, on openSUSE. As a start for cleaning up... > configure | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index 9b4fe34..4d9d9e0 100755 > --- a/configure > +++ b/configure > @@ -2549,9 +2549,12 @@ ucontext_coroutine=3Dno > if test "$darwin" !=3D "yes"; then > cat> $TMPC<< EOF > #include > -int main(void) { makecontext(0, 0, 0); } > +int main(void) { makecontext(0, 0, 0); return 0; } ...we could give a good example by adopting regular multi-line Coding=20 Style, like accept4() and others. Andreas > EOF > - if compile_prog "" "" ; then > + # Note that we enable fatal linker warnings to catch the > + # glibc "makecontext is not implemented and will always fail" > + # linker warning. > + if compile_prog "-Wl,--fatal-warnings" "" ; then > ucontext_coroutine=3Dyes > fi > fi --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746, AG N=FCrnb= erg