From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FUS0F-0000Ws-GK for qemu-devel@nongnu.org; Fri, 14 Apr 2006 13:22:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FUS0D-0000Vw-H7 for qemu-devel@nongnu.org; Fri, 14 Apr 2006 13:22:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FUS0D-0000Vq-BN for qemu-devel@nongnu.org; Fri, 14 Apr 2006 13:22:37 -0400 Received: from [193.7.176.20] (helo=bender.bawue.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1FUS0E-00029r-GG for qemu-devel@nongnu.org; Fri, 14 Apr 2006 13:22:38 -0400 Date: Fri, 14 Apr 2006 18:22:16 +0100 Subject: Re: [Qemu-devel] Patch to make configure /bin/sh compatible Message-ID: <20060414172216.GG4696@networkno.de> References: <20060414155705.VTQX18886.eastrmmtao06.cox.net@[172.18.52.8]> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060414155705.VTQX18886.eastrmmtao06.cox.net@[172.18.52.8]> From: Thiemo Seufer Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sol10x86@cox.net, qemu-devel@nongnu.org Ben Taylor wrote: > This is a patch to make configure truly /bin/sh compatible, > as well as changing some logic to remove "echo -n" for > output to files, as "echo -n" is not consistent among > environments. > > This is against the latest cvs branch, and I appreciate > any feedback. [snip] > @@ -294,7 +295,7 @@ > target_list="i386-user arm-user armeb-user sparc-user ppc-user mips-user mipsel-user $target_list" > fi > else > - target_list=$(echo "$target_list" | sed -e 's/,/ /g') > + target_list=`echo "$target_list" | sed -e 's/,/ /g'` A standard-conforming /bin/sh should be capable of handling this. > fi > if test -z "$target_list" ; then > echo "No targets enabled" > @@ -348,12 +349,12 @@ > # Check for gcc4 > if test "$check_gcc" = "yes" ; then > cat > $TMPC < -#if __GNUC__ >= 4 > +#if __GNUC__ < 4 > #error gcc4 > #endif > int main(){return 0;} > EOF > - if ! $cc -o $TMPO $TMPC 2>/dev/null ; then > + 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 that you use gcc 3.x to build QEMU" This looks weird, to error out if gcc is a good version. Wouldn't something like gcc -dM -E -xc /dev/null |awk '{ if (/__GNUC__/) print $3 }' be simpler to find out the gcc major version? Thiemo