qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] gcc detection fix for Mac OS X
@ 2007-04-29 10:01 Joachim Henke
  0 siblings, 0 replies; only message in thread
From: Joachim Henke @ 2007-04-29 10:01 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 366 bytes --]

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/

[-- Attachment #2: gccconf.diff --]
[-- Type: application/octet-stream, Size: 375 bytes --]

--- 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\""

[-- Attachment #3: Type: text/plain, Size: 2 bytes --]




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-29 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-29 10:01 [Qemu-devel] [PATCH] gcc detection fix for Mac OS X Joachim Henke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).