summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-28 16:24:26 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-28 16:24:26 (GMT)
commit4ff89fb6084d84aabe2e64aeccad03794af65a8a (patch)
tree0982bae88c784b984465112c287ddc48a72dbe42 /bootstrap
parent6e613ff399166c59e881331027e65c601feab807 (diff)
downloadCMake-4ff89fb6084d84aabe2e64aeccad03794af65a8a.zip
CMake-4ff89fb6084d84aabe2e64aeccad03794af65a8a.tar.gz
CMake-4ff89fb6084d84aabe2e64aeccad03794af65a8a.tar.bz2
AIX: Add -pthread flag to enable std::thread with GCC
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap13
1 files changed, 12 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index e02c289..ab087e9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -982,6 +982,9 @@ if [ -z "${CC}" -a -z "${CXX}" ]; then
fi
thread_flags=''
+case "${cmake_system}" in
+ *AIX*) thread_flags='-pthread' ;;
+esac
#-----------------------------------------------------------------------------
# Test C compiler
@@ -1003,6 +1006,10 @@ echo '
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
#endif
+#if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
+#error "On AIX with GNU we need the -pthread flag."
+#endif
+
#if defined(__sun) && __STDC_VERSION__ < 199901L
#error "On Solaris we need C99."
#endif
@@ -1066,6 +1073,10 @@ echo '
#error "Compiler is not in a mode aware of C++11."
#endif
+#if defined(_AIX) && defined(__GNUC__) && !defined(_THREAD_SAFE)
+#error "On AIX with GNU we need the -pthread flag."
+#endif
+
#if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x5140
#error "SunPro <= 5.13 mode not supported due to bug in move semantics."
#endif
@@ -1326,7 +1337,7 @@ else
uv_c_flags="${uv_c_flags} -DCMAKE_BOOTSTRAP"
case "${cmake_system}" in
*AIX*)
- uv_c_flags="${uv_c_flags} -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT -D_THREAD_SAFE"
+ uv_c_flags="${uv_c_flags} -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT"
libs="${libs} -lperfstat"
;;
*Darwin*)