From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FctSm-0006zP-1G for qemu-devel@nongnu.org; Sun, 07 May 2006 20:19:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FctSj-0006zD-MR for qemu-devel@nongnu.org; Sun, 07 May 2006 20:18:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FctSj-0006zA-F4 for qemu-devel@nongnu.org; Sun, 07 May 2006 20:18:57 -0400 Received: from [128.8.10.163] (helo=po1.wam.umd.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FctTS-0005xo-2z for qemu-devel@nongnu.org; Sun, 07 May 2006 20:19:42 -0400 Received: from jbrown.mylinuxbox.org (jma-box.student.umd.edu [129.2.253.219]) by po1.wam.umd.edu (8.12.11.20060308/8.12.10) with ESMTP id k480Iuhw025400 for ; Sun, 7 May 2006 20:18:56 -0400 (EDT) Date: Sun, 7 May 2006 20:18:55 -0400 From: "Jim C. Brown" Subject: Re: [Qemu-devel] -cc checking wrong Message-ID: <20060508001855.GA15033@jbrown.mylinuxbox.org> References: <87aca2qjj9.fsf@Janik.cz> <87d5eppicn.fsf@Janik.cz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="45Z9DzgjV8m4Oswq" Content-Disposition: inline In-Reply-To: <87d5eppicn.fsf@Janik.cz> 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 --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 08, 2006 at 12:46:24AM +0200, Pavel Jan?k wrote: > configure contains: > > if [ ! -x "`which $cc`" ] ; then > echo "Compiler $cc could not be found" > exit > fi > > You should check if the command compiles, not if it exists and is executable. Patch attached. Simply tries to compile a dummy program. > Two wrongs do not make a right. > -- Linus Torvalds in linux-kernel I find that quote very ironic ... ;) -- Infinite complexity begets infinite beauty. Infinite precision begets infinite perfection. --45Z9DzgjV8m4Oswq Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="configure.patch" --- configure.orig Sun May 7 20:14:23 2006 +++ configure Sun May 7 20:16:58 2006 @@ -293,8 +293,14 @@ ar="${cross_prefix}${ar}" strip="${cross_prefix}${strip}" -if [ ! -x "`which $cc`" ] ; then - echo "Compiler $cc could not be found" +# check that gcc is able to compile +cat > $TMPC </dev/null ; then + echo "Compiler $cc either does not exist or does not work" exit fi --45Z9DzgjV8m4Oswq--