diff mbox

[i386] : Correct HAVE_AS_IX86_REP_LOCK_PREFIX configure test for Darwin

Message ID 1278709397.2387.10.camel@localhost
State New
Headers show

Commit Message

Uros Bizjak July 9, 2010, 9:03 p.m. UTC
On Fri, 2010-07-09 at 20:44 +0100, IainS wrote:

> Hm. but you did change the test from
> 
> #if !HAVE_AS_IX86_REP_LOCK_PREFIX
> 
> to
> 
> #ifndef HAVE_AS_IX86_REP_LOCK_PREFIX
> 	...
> #endif
> 
> but
> 
> HAVE_AS_IX86_REP_LOCK_PREFIX is defined as 0 or 1

Uh, yes.  Fixed by attached patch:

2010-07-09  Uros Bizjak  <ubizjak@gmail.com>

	* configure.ac (gcc_cv_as_ix86_rep_lock_prefix): Fix test.
	* configure: Regenerate.

Tested on x86_64-pc-linux-gnu, committed to mainline SVN.

Thanks for noticing,
Uros.
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 162014)
+++ configure.ac	(working copy)
@@ -3328,10 +3328,9 @@ 
         gcc_cv_as_ix86_rep_lock_prefix,,,
 	[rep movsl
 	 lock addl %edi, (%eax,%esi)
-	 lock orl $0, (%esp)])
-    AC_DEFINE_UNQUOTED(HAVE_AS_IX86_REP_LOCK_PREFIX,
-      [`if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then echo 1; else echo 0; fi`],
-      [Define true if the assembler supports 'rep <insn>, lock <insn>'.])
+	 lock orl $0, (%esp)],,
+        [AC_DEFINE(HAVE_AS_IX86_REP_LOCK_PREFIX, 1,
+          [Define if the assembler supports 'rep <insn>, lock <insn>'.])])
 
     ;;
 
Index: configure
===================================================================
--- configure	(revision 162014)
+++ configure	(working copy)
@@ -23356,13 +23356,12 @@ 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ix86_rep_lock_prefix" >&5
 $as_echo "$gcc_cv_as_ix86_rep_lock_prefix" >&6; }
+if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then
 
+$as_echo "#define HAVE_AS_IX86_REP_LOCK_PREFIX 1" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_AS_IX86_REP_LOCK_PREFIX `if test $gcc_cv_as_ix86_rep_lock_prefix = yes; then echo 1; else echo 0; fi`
-_ACEOF
+fi
 
-
     ;;
 
   ia64*-*-*)