diff options
-rw-r--r-- | config/libc.in | 14 | ||||
-rw-r--r-- | config/libc/glibc.in | 6 | ||||
-rw-r--r-- | config/libc/mingw.in | 4 | ||||
-rw-r--r-- | patches/glibc/2.24/100-Cygwin-doesnt-have-stat64.patch | 13 | ||||
-rw-r--r-- | scripts/build/libc/mingw.sh | 27 |
5 files changed, 61 insertions, 3 deletions
diff --git a/config/libc.in b/config/libc.in index 4cc7530..e1eabd2 100644 --- a/config/libc.in +++ b/config/libc.in @@ -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" diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 96879cc..3ab88e9 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -71,6 +71,11 @@ choice # Don't remove next line # CT_INSERT_VERSION_BELOW +config LIBC_GLIBC_V_2_24 + bool + prompt "2.24" + select LIBC_GLIBC_2_23_or_later + config LIBC_GLIBC_V_2_23 bool prompt "2.23" @@ -125,6 +130,7 @@ config LIBC_VERSION string # Don't remove next line # CT_INSERT_VERSION_STRING_BELOW + default "2.24" if LIBC_GLIBC_V_2_24 default "2.23" if LIBC_GLIBC_V_2_23 default "2.22" if LIBC_GLIBC_V_2_22 default "2.21" if LIBC_GLIBC_V_2_21 diff --git a/config/libc/mingw.in b/config/libc/mingw.in index 88088e9..45b6971 100644 --- a/config/libc/mingw.in +++ b/config/libc/mingw.in @@ -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 diff --git a/patches/glibc/2.24/100-Cygwin-doesnt-have-stat64.patch b/patches/glibc/2.24/100-Cygwin-doesnt-have-stat64.patch new file mode 100644 index 0000000..9097628 --- /dev/null +++ b/patches/glibc/2.24/100-Cygwin-doesnt-have-stat64.patch @@ -0,0 +1,13 @@ +--- glibc-2.22/sunrpc/rpc_main.c.orig 2015-08-05 07:42:21.000000000 +0100 ++++ glibc-2.22/sunrpc/rpc_main.c 2015-10-21 23:37:31.071268800 +0100 +@@ -51,6 +51,10 @@ + #include "rpc_scan.h" + #include "proto.h" + ++#if defined(__CYGWIN__) ++#define stat64 stat ++#endif ++ + #include "../version.h" + #define PACKAGE _libc_intl_domainname + diff --git a/scripts/build/libc/mingw.sh b/scripts/build/libc/mingw.sh index 44ca008..e2b781d 100644 --- a/scripts/build/libc/mingw.sh +++ b/scripts/build/libc/mingw.sh @@ -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 +} |