Commit d6ac37e1 authored by MySQL Build Team's avatar MySQL Build Team

Use AC_TRY_RUN instead of AC_TRY_LINK when checking for x86 PAUSE instruction...

Use AC_TRY_RUN instead of AC_TRY_LINK when checking for x86 PAUSE instruction support, due to http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 .
parent 8a2e76e6
...@@ -2357,10 +2357,20 @@ fi ...@@ -2357,10 +2357,20 @@ fi
#Check for x86 PAUSE instruction #Check for x86 PAUSE instruction
AC_MSG_CHECKING("for x86 PAUSE instruction") AC_MSG_CHECKING("for x86 PAUSE instruction")
AC_TRY_COMPILE( # We have to actually try running the test program, because of a bug
[], # in Solaris on x86_64, where it wrongly reports that PAUSE is not
[{__asm__ __volatile__ ("pause");}], # supported when trying to run an application. See
x86_pause_exists=yes, x86_pause_exists=no) # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684
AC_TRY_RUN([
int main() {
__asm__ __volatile__ ("pause");
return 0;
}
],
[x86_pause_exists=yes],
[x86_pause_exists=no],
[x86_pause_exists=no] # Cross-compile, assume no PAUSE instruction
)
if test "$x86_pause_exists" = "yes" if test "$x86_pause_exists" = "yes"
then then
AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment