mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-23 14:42:26 +00:00
Merge pull request #368 from dremon/master
MinGW: add C++11 posix threads support
This commit is contained in:
commit
8fbe000639
@ -32,6 +32,10 @@ config LIBC_SUPPORT_THREADS_LT
|
||||
bool
|
||||
select LIBC_SUPPORT_THREADS_ANY
|
||||
|
||||
config LIBC_SUPPORT_THREADS_POSIX
|
||||
bool
|
||||
select LIBC_SUPPORT_THREADS_ANY
|
||||
|
||||
config LIBC_SUPPORT_THREADS_NONE
|
||||
bool
|
||||
|
||||
@ -51,8 +55,9 @@ choice
|
||||
bool
|
||||
prompt "Threading implementation to use:"
|
||||
default THREADS_NATIVE if LIBC_SUPPORT_THREADS_NATIVE
|
||||
default THREADS_THREADS_LT if LIBC_SUPPORT_THREADS_LT && ! LIBC_SUPPORT_THREADS_NATIVE
|
||||
default THREADS_NONE if ! LIBC_SUPPORT_THREADS_ANY
|
||||
default THREADS_THREADS_LT if LIBC_SUPPORT_THREADS_LT
|
||||
default THREADS_THREADS_POSIX if LIBC_SUPPORT_THREADS_POSIX
|
||||
default THREADS_NONE
|
||||
|
||||
config THREADS_NATIVE
|
||||
bool
|
||||
@ -70,6 +75,11 @@ config THREADS_LT
|
||||
prompt "linuxthreads"
|
||||
depends on LIBC_SUPPORT_THREADS_LT
|
||||
|
||||
config THREADS_POSIX
|
||||
bool
|
||||
prompt "posix"
|
||||
depends on LIBC_SUPPORT_THREADS_POSIX
|
||||
|
||||
config THREADS_NONE
|
||||
bool
|
||||
prompt "none"
|
||||
|
@ -3,12 +3,14 @@
|
||||
## depends on WINDOWS
|
||||
##
|
||||
## select LIBC_SUPPORT_THREADS_NATIVE
|
||||
## select LIBC_SUPPORT_THREADS_POSIX
|
||||
## select CC_CORE_PASS_2_NEEDED
|
||||
##
|
||||
## help The de-facto standard for Mingw distributions.
|
||||
|
||||
config THREADS
|
||||
default "win32"
|
||||
default "win32" if THREADS_NATIVE
|
||||
default "posix" if THREADS_POSIX
|
||||
|
||||
choice
|
||||
bool
|
||||
|
@ -110,8 +110,35 @@ do_libc() {
|
||||
CT_DoExecLog ALL ${make} install DESTDIR=${CT_SYSROOT_DIR}
|
||||
|
||||
CT_EndStep
|
||||
|
||||
if [ "${CT_THREADS}" = "posix" ]; then
|
||||
do_pthreads
|
||||
fi
|
||||
}
|
||||
|
||||
do_libc_post_cc() {
|
||||
:
|
||||
}
|
||||
|
||||
do_pthreads() {
|
||||
CT_DoStep INFO "Building mingw-w64-winpthreads files"
|
||||
|
||||
CT_DoLog EXTRA "Configuring mingw-w64-winpthreads"
|
||||
|
||||
CT_mkdir_pushd "${CT_BUILD_DIR}/build-mingw-w64-winpthreads"
|
||||
|
||||
CT_DoExecLog CFG \
|
||||
"${CT_SRC_DIR}/mingw-w64-${CT_WINAPI_VERSION_DOWNLOADED}/mingw-w64-libraries/winpthreads/configure" \
|
||||
--with-sysroot=${CT_SYSROOT_DIR} \
|
||||
--prefix=${MINGW_INSTALL_PREFIX} \
|
||||
--build=${CT_BUILD} \
|
||||
--host=${CT_TARGET} \
|
||||
|
||||
CT_DoLog EXTRA "Building mingw-w64-winpthreads"
|
||||
CT_DoExecLog ALL ${make} ${JOBSFLAGS}
|
||||
|
||||
CT_DoLog EXTRA "Installing mingw-w64-winpthreads"
|
||||
CT_DoExecLog ALL ${make} install DESTDIR=${CT_SYSROOT_DIR}
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user