[llvm-commits] [llvm] r109646 - /llvm/trunk/autoconf/configure.ac

Eric Christopher echristo at apple.com
Wed Jul 28 13:26:34 PDT 2010


Author: echristo
Date: Wed Jul 28 15:26:34 2010
New Revision: 109646

URL: http://llvm.org/viewvc/llvm-project?rev=109646&view=rev
Log:
Use a C++ compiler for the atomic builtin check since we'll
be using a C++ compiler to build.

Patch by Török Edwin!

Modified:
    llvm/trunk/autoconf/configure.ac

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=109646&r1=109645&r2=109646&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Wed Jul 28 15:26:34 2010
@@ -1355,6 +1355,9 @@
 
 dnl atomic builtins are required for threading support.
 AC_MSG_CHECKING(for GCC atomic builtins)
+dnl Since we'll be using these atomic builtins in C++ files we should test
+dnl the C++ compiler.
+AC_LANG_PUSH([C++])
 AC_LINK_IFELSE(
   AC_LANG_SOURCE(
     [[int main() {
@@ -1366,6 +1369,7 @@
         return 0;
       }
     ]]),
+  AC_LANG_POP([C++])
   AC_MSG_RESULT(yes)
   AC_DEFINE(LLVM_MULTITHREADED, 1, Build multithreading support into LLVM),
   AC_MSG_RESULT(no)





More information about the llvm-commits mailing list