From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hi6Kg-0002rC-4p for qemu-devel@nongnu.org; Sun, 29 Apr 2007 06:08:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hi6Kc-0002qz-4Z for qemu-devel@nongnu.org; Sun, 29 Apr 2007 06:08:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hi6Kb-0002qw-UW for qemu-devel@nongnu.org; Sun, 29 Apr 2007 06:08:37 -0400 Received: from mail7.worldserver.net ([217.13.200.27]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1Hi6EX-00040u-HW for qemu-devel@nongnu.org; Sun, 29 Apr 2007 06:02:21 -0400 Mime-Version: 1.0 (Apple Message framework v752.2) Message-Id: Content-Type: multipart/mixed; boundary=Apple-Mail-8--182271619 From: Joachim Henke Date: Sun, 29 Apr 2007 12:01:47 +0200 Subject: [Qemu-devel] [PATCH] gcc detection fix for Mac OS X 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 --Apple-Mail-8--182271619 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hello, on Mac OS X the command 'which' always returns true - regardless of the result. This is a problem, when the configure script tries to detect the right gcc version. An alternative to 'which' could be to try to invoke the compiler directly. Please have a look at the attached patch. Thanks, Jo. -- Joachim Henke http://base91.sourceforge.net/j-o/ --Apple-Mail-8--182271619 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0600; name=gccconf.diff Content-Disposition: attachment; filename=gccconf.diff --- configure +++ configure @@ -396,7 +396,2 @@ EOF - check_cc() { - which "$1" 2> /dev/null - return $? - } - if "$cc" -o $TMPE $TMPC 2> /dev/null ; then @@ -407,3 +402,3 @@ for compat_cc in $gcc3_list ; do - if check_cc "$cross_prefix$compat_cc" ; then + if "$cross_prefix$compat_cc" --version > /dev/null 2>&1 ; then echo "Found \"$compat_cc\"" --Apple-Mail-8--182271619 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed --Apple-Mail-8--182271619--