All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
@ 2018-11-15  9:28 Samuli Piippo
  2018-11-15  9:29 ` [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake Samuli Piippo
  2018-11-15 17:21 ` [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Burton, Ross
  0 siblings, 2 replies; 12+ messages in thread
From: Samuli Piippo @ 2018-11-15  9:28 UTC (permalink / raw)
  To: yocto

Use the winpthreads library available in the mingw64 and
change the thread model from win32 to posix to get access
to c++11 features.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
 conf/machine-sdk/include/mingw32-common.inc   |  2 -
 recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
 recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
 recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
 .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
 .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
 .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
 7 files changed, 40 insertions(+), 54 deletions(-)
 create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
 delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb

diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
index cd56380..733d092 100644
--- a/conf/machine-sdk/include/mingw32-common.inc
+++ b/conf/machine-sdk/include/mingw32-common.inc
@@ -1,8 +1,6 @@
 SDK_OS = "mingw32"
 NATIVESDKLIBC = "libc-mingw"
 
-GCCTHREADS_mingw32 = "win32"
-
 PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
 PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
index b26b734..21749f3 100644
--- a/recipes-core/gettext/gettext_0.19.%.bbappend
+++ b/recipes-core/gettext/gettext_0.19.%.bbappend
@@ -1,7 +1,4 @@
-DEPENDS_append_mingw32 = " pthreads-win32"
-LDFLAGS_prepend_mingw32 = " -lpthread "
-
-EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
+EXTRA_OECONF_append_mingw32 = " --enable-static"
 
 FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
 SRC_URI_append_mingw32 = " \
diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
index 1641cb9..f14edf1 100644
--- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
+++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
@@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
 # mingw builds
 RUNTIMETARGET_remove_mingw32 = "libmpx"
 
-DEPENDS_append_mingw32 = " pthreads-win32"
+DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
index 2a95d02..f542cfc 100644
--- a/recipes-devtools/gcc/libgcc_%.bbappend
+++ b/recipes-devtools/gcc/libgcc_%.bbappend
@@ -1,3 +1,5 @@
+DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
+
 FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
 FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
 
diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
index e129c32..009e5af 100644
--- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
@@ -31,4 +31,9 @@ do_compile() {
 	:
 }
 
+do_install_append() {
+    # install correct pthread headers
+    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
+}
+
 FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
new file mode 100644
index 0000000..1308760
--- /dev/null
+++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
+LICENSE = "ZPL-2.1"
+LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
+
+COMPATIBLE_HOST = ".*-mingw.*"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
+SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
+SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
+
+S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+inherit autotools nativesdk
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
+
+do_configure() {
+    oe_runconf
+}
+
+STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
+TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
+PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+
+do_install_append() {
+    # headers are already installed by mingw-w64-headers
+    rm -rf ${D}${includedir}
+}
diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
deleted file mode 100644
index e4a0f80..0000000
--- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
-HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-BBCLASSEXTEND = "nativesdk"
-
-COMPATIBLE_HOST = ".*-mingw.*"
-
-## Replace dots with dashes
-PVdash = "2-9-1"
-
-## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
-SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
-SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
-SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
-
-## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
-#SRC_URI += "file://w64sup.patch"
-
-S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
-
-INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
-
-do_configure_prepend() {
-    ## First reset all permissions because all are executable
-    find . -type f -exec chmod 644 {} \;
-    ## Make a copy of config.h
-    cp config.h pthreads_win32_config.h
-}
-
-do_compile() {
-    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
-}
-
-do_install() {
-    install -d -m 0755 ${D}${bindir}
-    install -d -m 0755 ${D}${includedir}
-    install -d -m 0755 ${D}${libdir}
-
-    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
-
-    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
-    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
-    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
-}
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
  2018-11-15  9:28 [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Samuli Piippo
@ 2018-11-15  9:29 ` Samuli Piippo
  2018-11-16  3:35   ` Joshua Watt
  2018-11-20 10:51   ` [meta-mingw][PATCH v2 " Samuli Piippo
  2018-11-15 17:21 ` [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Burton, Ross
  1 sibling, 2 replies; 12+ messages in thread
From: Samuli Piippo @ 2018-11-15  9:29 UTC (permalink / raw)
  To: yocto

Build nativesdk-cmake and dependency libs without without openssl.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
 .../nativesdk-packagegroup-sdk-host.bbappend              | 1 +
 recipes-devtools/cmake/cmake_%.bbappend                   | 8 ++++++++
 recipes-extended/libarchive/libarchive_%.bbappend         | 1 +
 recipes-support/curl/curl_%.bbappend                      | 2 ++
 4 files changed, 12 insertions(+)
 create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
 create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
 create mode 100644 recipes-support/curl/curl_%.bbappend

diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
index ad69b13..9544ffb 100644
--- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
+++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
@@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\
     nativesdk-pkgconfig \
     nativesdk-libtool \
     nativesdk-qemu \
+    nativesdk-cmake \
     "
diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
new file mode 100644
index 0000000..f76cd82
--- /dev/null
+++ b/recipes-devtools/cmake/cmake_%.bbappend
@@ -0,0 +1,8 @@
+DEPENDS_remove_mingw32 = "ncurses"
+
+cmake_do_generate_toolchain_file_append_mingw32() {
+    cat >> ${WORKDIR}/toolchain.cmake <<EOF
+set( CMAKE_SYSTEM_NAME Windows )
+EOF
+}
+
diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
new file mode 100644
index 0000000..a411b40
--- /dev/null
+++ b/recipes-extended/libarchive/libarchive_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = " --without-cng"
diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend
new file mode 100644
index 0000000..7865b46
--- /dev/null
+++ b/recipes-support/curl/curl_%.bbappend
@@ -0,0 +1,2 @@
+PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
+RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
  2018-11-15  9:28 [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Samuli Piippo
  2018-11-15  9:29 ` [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake Samuli Piippo
@ 2018-11-15 17:21 ` Burton, Ross
  2018-11-15 17:31   ` Samuli Piippo
  1 sibling, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2018-11-15 17:21 UTC (permalink / raw)
  To: samuli.piippo; +Cc: Yocto-mailing-list

I see 1/2 but no 2/2, presumably this missing patch is the PIE one?

Ross
On Thu, 15 Nov 2018 at 16:04, Samuli Piippo <samuli.piippo@qt.io> wrote:
>
> Use the winpthreads library available in the mingw64 and
> change the thread model from win32 to posix to get access
> to c++11 features.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
>  conf/machine-sdk/include/mingw32-common.inc   |  2 -
>  recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
>  recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
>  recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
>  .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
>  .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
>  .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
>  7 files changed, 40 insertions(+), 54 deletions(-)
>  create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>  delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>
> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
> index cd56380..733d092 100644
> --- a/conf/machine-sdk/include/mingw32-common.inc
> +++ b/conf/machine-sdk/include/mingw32-common.inc
> @@ -1,8 +1,6 @@
>  SDK_OS = "mingw32"
>  NATIVESDKLIBC = "libc-mingw"
>
> -GCCTHREADS_mingw32 = "win32"
> -
>  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
>  PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
>  PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
> diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
> index b26b734..21749f3 100644
> --- a/recipes-core/gettext/gettext_0.19.%.bbappend
> +++ b/recipes-core/gettext/gettext_0.19.%.bbappend
> @@ -1,7 +1,4 @@
> -DEPENDS_append_mingw32 = " pthreads-win32"
> -LDFLAGS_prepend_mingw32 = " -lpthread "
> -
> -EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
> +EXTRA_OECONF_append_mingw32 = " --enable-static"
>
>  FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
>  SRC_URI_append_mingw32 = " \
> diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
> index 1641cb9..f14edf1 100644
> --- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
> +++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
> @@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
>  # mingw builds
>  RUNTIMETARGET_remove_mingw32 = "libmpx"
>
> -DEPENDS_append_mingw32 = " pthreads-win32"
> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
> diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
> index 2a95d02..f542cfc 100644
> --- a/recipes-devtools/gcc/libgcc_%.bbappend
> +++ b/recipes-devtools/gcc/libgcc_%.bbappend
> @@ -1,3 +1,5 @@
> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
> +
>  FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
>  FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
>
> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> index e129c32..009e5af 100644
> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> @@ -31,4 +31,9 @@ do_compile() {
>         :
>  }
>
> +do_install_append() {
> +    # install correct pthread headers
> +    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
> +}
> +
>  FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
> new file mode 100644
> index 0000000..1308760
> --- /dev/null
> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
> @@ -0,0 +1,31 @@
> +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
> +LICENSE = "ZPL-2.1"
> +LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
> +
> +COMPATIBLE_HOST = ".*-mingw.*"
> +
> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
> +SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
> +SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
> +
> +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
> +B = "${WORKDIR}/build-${TARGET_SYS}"
> +
> +inherit autotools nativesdk
> +
> +INHIBIT_DEFAULT_DEPS = "1"
> +DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
> +
> +do_configure() {
> +    oe_runconf
> +}
> +
> +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
> +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
> +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
> +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
> +
> +do_install_append() {
> +    # headers are already installed by mingw-w64-headers
> +    rm -rf ${D}${includedir}
> +}
> diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
> deleted file mode 100644
> index e4a0f80..0000000
> --- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
> -HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
> -LICENSE = "LGPLv2.1"
> -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
> -
> -BBCLASSEXTEND = "nativesdk"
> -
> -COMPATIBLE_HOST = ".*-mingw.*"
> -
> -## Replace dots with dashes
> -PVdash = "2-9-1"
> -
> -## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
> -SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
> -SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
> -SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
> -
> -## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
> -#SRC_URI += "file://w64sup.patch"
> -
> -S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
> -
> -INHIBIT_DEFAULT_DEPS = "1"
> -DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
> -
> -do_configure_prepend() {
> -    ## First reset all permissions because all are executable
> -    find . -type f -exec chmod 644 {} \;
> -    ## Make a copy of config.h
> -    cp config.h pthreads_win32_config.h
> -}
> -
> -do_compile() {
> -    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
> -}
> -
> -do_install() {
> -    install -d -m 0755 ${D}${bindir}
> -    install -d -m 0755 ${D}${includedir}
> -    install -d -m 0755 ${D}${libdir}
> -
> -    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
> -
> -    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
> -}
> --
> 2.17.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
  2018-11-15 17:21 ` [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Burton, Ross
@ 2018-11-15 17:31   ` Samuli Piippo
  2018-11-15 17:33     ` Burton, Ross
  0 siblings, 1 reply; 12+ messages in thread
From: Samuli Piippo @ 2018-11-15 17:31 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list


2/2 is also unrelated, there should 3 patches from me, sent at the same time. Don’t know where they got stuck.

> On 15 Nov 2018, at 19.21, Burton, Ross <ross.burton@intel.com> wrote:
> 
> I see 1/2 but no 2/2, presumably this missing patch is the PIE one?
> 
> Ross
>> On Thu, 15 Nov 2018 at 16:04, Samuli Piippo <samuli.piippo@qt.io> wrote:
>> 
>> Use the winpthreads library available in the mingw64 and
>> change the thread model from win32 to posix to get access
>> to c++11 features.
>> 
>> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>> ---
>> conf/machine-sdk/include/mingw32-common.inc   |  2 -
>> recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
>> recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
>> recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
>> .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
>> .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
>> .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
>> 7 files changed, 40 insertions(+), 54 deletions(-)
>> create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>> delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>> 
>> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
>> index cd56380..733d092 100644
>> --- a/conf/machine-sdk/include/mingw32-common.inc
>> +++ b/conf/machine-sdk/include/mingw32-common.inc
>> @@ -1,8 +1,6 @@
>> SDK_OS = "mingw32"
>> NATIVESDKLIBC = "libc-mingw"
>> 
>> -GCCTHREADS_mingw32 = "win32"
>> -
>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
>> PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
>> diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
>> index b26b734..21749f3 100644
>> --- a/recipes-core/gettext/gettext_0.19.%.bbappend
>> +++ b/recipes-core/gettext/gettext_0.19.%.bbappend
>> @@ -1,7 +1,4 @@
>> -DEPENDS_append_mingw32 = " pthreads-win32"
>> -LDFLAGS_prepend_mingw32 = " -lpthread "
>> -
>> -EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
>> +EXTRA_OECONF_append_mingw32 = " --enable-static"
>> 
>> FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
>> SRC_URI_append_mingw32 = " \
>> diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>> index 1641cb9..f14edf1 100644
>> --- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
>> +++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>> @@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
>> # mingw builds
>> RUNTIMETARGET_remove_mingw32 = "libmpx"
>> 
>> -DEPENDS_append_mingw32 = " pthreads-win32"
>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>> diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
>> index 2a95d02..f542cfc 100644
>> --- a/recipes-devtools/gcc/libgcc_%.bbappend
>> +++ b/recipes-devtools/gcc/libgcc_%.bbappend
>> @@ -1,3 +1,5 @@
>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>> +
>> FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
>> FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
>> 
>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>> index e129c32..009e5af 100644
>> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>> @@ -31,4 +31,9 @@ do_compile() {
>>        :
>> }
>> 
>> +do_install_append() {
>> +    # install correct pthread headers
>> +    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
>> +}
>> +
>> FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>> new file mode 100644
>> index 0000000..1308760
>> --- /dev/null
>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>> @@ -0,0 +1,31 @@
>> +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
>> +LICENSE = "ZPL-2.1"
>> +LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
>> +
>> +COMPATIBLE_HOST = ".*-mingw.*"
>> +
>> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
>> +SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
>> +SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
>> +
>> +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
>> +B = "${WORKDIR}/build-${TARGET_SYS}"
>> +
>> +inherit autotools nativesdk
>> +
>> +INHIBIT_DEFAULT_DEPS = "1"
>> +DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
>> +
>> +do_configure() {
>> +    oe_runconf
>> +}
>> +
>> +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
>> +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
>> +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>> +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
>> +
>> +do_install_append() {
>> +    # headers are already installed by mingw-w64-headers
>> +    rm -rf ${D}${includedir}
>> +}
>> diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>> deleted file mode 100644
>> index e4a0f80..0000000
>> --- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>> +++ /dev/null
>> @@ -1,47 +0,0 @@
>> -DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
>> -HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
>> -LICENSE = "LGPLv2.1"
>> -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
>> -
>> -BBCLASSEXTEND = "nativesdk"
>> -
>> -COMPATIBLE_HOST = ".*-mingw.*"
>> -
>> -## Replace dots with dashes
>> -PVdash = "2-9-1"
>> -
>> -## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
>> -SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
>> -SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
>> -SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
>> -
>> -## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
>> -#SRC_URI += "file://w64sup.patch"
>> -
>> -S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
>> -
>> -INHIBIT_DEFAULT_DEPS = "1"
>> -DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
>> -
>> -do_configure_prepend() {
>> -    ## First reset all permissions because all are executable
>> -    find . -type f -exec chmod 644 {} \;
>> -    ## Make a copy of config.h
>> -    cp config.h pthreads_win32_config.h
>> -}
>> -
>> -do_compile() {
>> -    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
>> -}
>> -
>> -do_install() {
>> -    install -d -m 0755 ${D}${bindir}
>> -    install -d -m 0755 ${D}${includedir}
>> -    install -d -m 0755 ${D}${libdir}
>> -
>> -    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
>> -
>> -    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
>> -}
>> --
>> 2.17.1
>> 
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
  2018-11-15 17:31   ` Samuli Piippo
@ 2018-11-15 17:33     ` Burton, Ross
  2018-11-15 17:45       ` Samuli Piippo
  0 siblings, 1 reply; 12+ messages in thread
From: Burton, Ross @ 2018-11-15 17:33 UTC (permalink / raw)
  To: samuli.piippo; +Cc: Yocto-mailing-list

Weird.

Can you push them to a git repo?

Ross
On Thu, 15 Nov 2018 at 17:32, Samuli Piippo <samuli.piippo@qt.io> wrote:
>
>
> 2/2 is also unrelated, there should 3 patches from me, sent at the same time. Don’t know where they got stuck.
>
> > On 15 Nov 2018, at 19.21, Burton, Ross <ross.burton@intel.com> wrote:
> >
> > I see 1/2 but no 2/2, presumably this missing patch is the PIE one?
> >
> > Ross
> >> On Thu, 15 Nov 2018 at 16:04, Samuli Piippo <samuli.piippo@qt.io> wrote:
> >>
> >> Use the winpthreads library available in the mingw64 and
> >> change the thread model from win32 to posix to get access
> >> to c++11 features.
> >>
> >> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> >> ---
> >> conf/machine-sdk/include/mingw32-common.inc   |  2 -
> >> recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
> >> recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
> >> recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
> >> .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
> >> .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
> >> .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
> >> 7 files changed, 40 insertions(+), 54 deletions(-)
> >> create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
> >> delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
> >>
> >> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
> >> index cd56380..733d092 100644
> >> --- a/conf/machine-sdk/include/mingw32-common.inc
> >> +++ b/conf/machine-sdk/include/mingw32-common.inc
> >> @@ -1,8 +1,6 @@
> >> SDK_OS = "mingw32"
> >> NATIVESDKLIBC = "libc-mingw"
> >>
> >> -GCCTHREADS_mingw32 = "win32"
> >> -
> >> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
> >> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
> >> PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
> >> diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
> >> index b26b734..21749f3 100644
> >> --- a/recipes-core/gettext/gettext_0.19.%.bbappend
> >> +++ b/recipes-core/gettext/gettext_0.19.%.bbappend
> >> @@ -1,7 +1,4 @@
> >> -DEPENDS_append_mingw32 = " pthreads-win32"
> >> -LDFLAGS_prepend_mingw32 = " -lpthread "
> >> -
> >> -EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
> >> +EXTRA_OECONF_append_mingw32 = " --enable-static"
> >>
> >> FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
> >> SRC_URI_append_mingw32 = " \
> >> diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
> >> index 1641cb9..f14edf1 100644
> >> --- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
> >> +++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
> >> @@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
> >> # mingw builds
> >> RUNTIMETARGET_remove_mingw32 = "libmpx"
> >>
> >> -DEPENDS_append_mingw32 = " pthreads-win32"
> >> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
> >> diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
> >> index 2a95d02..f542cfc 100644
> >> --- a/recipes-devtools/gcc/libgcc_%.bbappend
> >> +++ b/recipes-devtools/gcc/libgcc_%.bbappend
> >> @@ -1,3 +1,5 @@
> >> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
> >> +
> >> FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
> >> FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
> >>
> >> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> >> index e129c32..009e5af 100644
> >> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> >> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
> >> @@ -31,4 +31,9 @@ do_compile() {
> >>        :
> >> }
> >>
> >> +do_install_append() {
> >> +    # install correct pthread headers
> >> +    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
> >> +}
> >> +
> >> FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
> >> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
> >> new file mode 100644
> >> index 0000000..1308760
> >> --- /dev/null
> >> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
> >> @@ -0,0 +1,31 @@
> >> +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
> >> +LICENSE = "ZPL-2.1"
> >> +LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
> >> +
> >> +COMPATIBLE_HOST = ".*-mingw.*"
> >> +
> >> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
> >> +SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
> >> +SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
> >> +
> >> +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
> >> +B = "${WORKDIR}/build-${TARGET_SYS}"
> >> +
> >> +inherit autotools nativesdk
> >> +
> >> +INHIBIT_DEFAULT_DEPS = "1"
> >> +DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
> >> +
> >> +do_configure() {
> >> +    oe_runconf
> >> +}
> >> +
> >> +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
> >> +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
> >> +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
> >> +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
> >> +
> >> +do_install_append() {
> >> +    # headers are already installed by mingw-w64-headers
> >> +    rm -rf ${D}${includedir}
> >> +}
> >> diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
> >> deleted file mode 100644
> >> index e4a0f80..0000000
> >> --- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
> >> +++ /dev/null
> >> @@ -1,47 +0,0 @@
> >> -DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
> >> -HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
> >> -LICENSE = "LGPLv2.1"
> >> -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
> >> -
> >> -BBCLASSEXTEND = "nativesdk"
> >> -
> >> -COMPATIBLE_HOST = ".*-mingw.*"
> >> -
> >> -## Replace dots with dashes
> >> -PVdash = "2-9-1"
> >> -
> >> -## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
> >> -SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
> >> -SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
> >> -SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
> >> -
> >> -## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
> >> -#SRC_URI += "file://w64sup.patch"
> >> -
> >> -S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
> >> -
> >> -INHIBIT_DEFAULT_DEPS = "1"
> >> -DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
> >> -
> >> -do_configure_prepend() {
> >> -    ## First reset all permissions because all are executable
> >> -    find . -type f -exec chmod 644 {} \;
> >> -    ## Make a copy of config.h
> >> -    cp config.h pthreads_win32_config.h
> >> -}
> >> -
> >> -do_compile() {
> >> -    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
> >> -}
> >> -
> >> -do_install() {
> >> -    install -d -m 0755 ${D}${bindir}
> >> -    install -d -m 0755 ${D}${includedir}
> >> -    install -d -m 0755 ${D}${libdir}
> >> -
> >> -    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
> >> -
> >> -    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
> >> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
> >> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
> >> -}
> >> --
> >> 2.17.1
> >>
> >> --
> >> _______________________________________________
> >> yocto mailing list
> >> yocto@yoctoproject.org
> >> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
  2018-11-15 17:33     ` Burton, Ross
@ 2018-11-15 17:45       ` Samuli Piippo
  2018-11-15 20:38         ` Samuli Piippo
  0 siblings, 1 reply; 12+ messages in thread
From: Samuli Piippo @ 2018-11-15 17:45 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list

Sure, it’ll take me couple of hours though.
Let’s see if the missing emails appear meanwhile.

> On 15 Nov 2018, at 19.33, Burton, Ross <ross.burton@intel.com> wrote:
> 
> Weird.
> 
> Can you push them to a git repo?
> 
> Ross
>> On Thu, 15 Nov 2018 at 17:32, Samuli Piippo <samuli.piippo@qt.io> wrote:
>> 
>> 
>> 2/2 is also unrelated, there should 3 patches from me, sent at the same time. Don’t know where they got stuck.
>> 
>>> On 15 Nov 2018, at 19.21, Burton, Ross <ross.burton@intel.com> wrote:
>>> 
>>> I see 1/2 but no 2/2, presumably this missing patch is the PIE one?
>>> 
>>> Ross
>>>> On Thu, 15 Nov 2018 at 16:04, Samuli Piippo <samuli.piippo@qt.io> wrote:
>>>> 
>>>> Use the winpthreads library available in the mingw64 and
>>>> change the thread model from win32 to posix to get access
>>>> to c++11 features.
>>>> 
>>>> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>>>> ---
>>>> conf/machine-sdk/include/mingw32-common.inc   |  2 -
>>>> recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
>>>> recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
>>>> recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
>>>> .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
>>>> .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
>>>> .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
>>>> 7 files changed, 40 insertions(+), 54 deletions(-)
>>>> create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>> 
>>>> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
>>>> index cd56380..733d092 100644
>>>> --- a/conf/machine-sdk/include/mingw32-common.inc
>>>> +++ b/conf/machine-sdk/include/mingw32-common.inc
>>>> @@ -1,8 +1,6 @@
>>>> SDK_OS = "mingw32"
>>>> NATIVESDKLIBC = "libc-mingw"
>>>> 
>>>> -GCCTHREADS_mingw32 = "win32"
>>>> -
>>>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
>>>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
>>>> PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
>>>> diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> index b26b734..21749f3 100644
>>>> --- a/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> +++ b/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> @@ -1,7 +1,4 @@
>>>> -DEPENDS_append_mingw32 = " pthreads-win32"
>>>> -LDFLAGS_prepend_mingw32 = " -lpthread "
>>>> -
>>>> -EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
>>>> +EXTRA_OECONF_append_mingw32 = " --enable-static"
>>>> 
>>>> FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
>>>> SRC_URI_append_mingw32 = " \
>>>> diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> index 1641cb9..f14edf1 100644
>>>> --- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> +++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> @@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
>>>> # mingw builds
>>>> RUNTIMETARGET_remove_mingw32 = "libmpx"
>>>> 
>>>> -DEPENDS_append_mingw32 = " pthreads-win32"
>>>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>>>> diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
>>>> index 2a95d02..f542cfc 100644
>>>> --- a/recipes-devtools/gcc/libgcc_%.bbappend
>>>> +++ b/recipes-devtools/gcc/libgcc_%.bbappend
>>>> @@ -1,3 +1,5 @@
>>>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>>>> +
>>>> FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
>>>> FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
>>>> 
>>>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> index e129c32..009e5af 100644
>>>> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> @@ -31,4 +31,9 @@ do_compile() {
>>>>       :
>>>> }
>>>> 
>>>> +do_install_append() {
>>>> +    # install correct pthread headers
>>>> +    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
>>>> +}
>>>> +
>>>> FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
>>>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> new file mode 100644
>>>> index 0000000..1308760
>>>> --- /dev/null
>>>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> @@ -0,0 +1,31 @@
>>>> +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
>>>> +LICENSE = "ZPL-2.1"
>>>> +LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
>>>> +
>>>> +COMPATIBLE_HOST = ".*-mingw.*"
>>>> +
>>>> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
>>>> +SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
>>>> +SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
>>>> +
>>>> +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
>>>> +B = "${WORKDIR}/build-${TARGET_SYS}"
>>>> +
>>>> +inherit autotools nativesdk
>>>> +
>>>> +INHIBIT_DEFAULT_DEPS = "1"
>>>> +DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
>>>> +
>>>> +do_configure() {
>>>> +    oe_runconf
>>>> +}
>>>> +
>>>> +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
>>>> +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
>>>> +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>>>> +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
>>>> +
>>>> +do_install_append() {
>>>> +    # headers are already installed by mingw-w64-headers
>>>> +    rm -rf ${D}${includedir}
>>>> +}
>>>> diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>> deleted file mode 100644
>>>> index e4a0f80..0000000
>>>> --- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>> +++ /dev/null
>>>> @@ -1,47 +0,0 @@
>>>> -DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
>>>> -HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
>>>> -LICENSE = "LGPLv2.1"
>>>> -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
>>>> -
>>>> -BBCLASSEXTEND = "nativesdk"
>>>> -
>>>> -COMPATIBLE_HOST = ".*-mingw.*"
>>>> -
>>>> -## Replace dots with dashes
>>>> -PVdash = "2-9-1"
>>>> -
>>>> -## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
>>>> -SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
>>>> -SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
>>>> -SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
>>>> -
>>>> -## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
>>>> -#SRC_URI += "file://w64sup.patch"
>>>> -
>>>> -S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
>>>> -
>>>> -INHIBIT_DEFAULT_DEPS = "1"
>>>> -DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
>>>> -
>>>> -do_configure_prepend() {
>>>> -    ## First reset all permissions because all are executable
>>>> -    find . -type f -exec chmod 644 {} \;
>>>> -    ## Make a copy of config.h
>>>> -    cp config.h pthreads_win32_config.h
>>>> -}
>>>> -
>>>> -do_compile() {
>>>> -    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
>>>> -}
>>>> -
>>>> -do_install() {
>>>> -    install -d -m 0755 ${D}${bindir}
>>>> -    install -d -m 0755 ${D}${includedir}
>>>> -    install -d -m 0755 ${D}${libdir}
>>>> -
>>>> -    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
>>>> -
>>>> -    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
>>>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
>>>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
>>>> -}
>>>> --
>>>> 2.17.1
>>>> 
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64
  2018-11-15 17:45       ` Samuli Piippo
@ 2018-11-15 20:38         ` Samuli Piippo
  0 siblings, 0 replies; 12+ messages in thread
From: Samuli Piippo @ 2018-11-15 20:38 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Yocto-mailing-list

[-- Attachment #1: Type: text/plain, Size: 8949 bytes --]

I don't have access to the contrib git repo, so pushed them here instead: https://github.com/sapiippo/meta-mingw/

________________________________
From: Samuli Piippo
Sent: 15 November 2018 19:45:29
To: Burton, Ross
Cc: Yocto-mailing-list
Subject: Re: [yocto] [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64

Sure, it’ll take me couple of hours though.
Let’s see if the missing emails appear meanwhile.

> On 15 Nov 2018, at 19.33, Burton, Ross <ross.burton@intel.com> wrote:
>
> Weird.
>
> Can you push them to a git repo?
>
> Ross
>> On Thu, 15 Nov 2018 at 17:32, Samuli Piippo <samuli.piippo@qt.io> wrote:
>>
>>
>> 2/2 is also unrelated, there should 3 patches from me, sent at the same time. Don’t know where they got stuck.
>>
>>> On 15 Nov 2018, at 19.21, Burton, Ross <ross.burton@intel.com> wrote:
>>>
>>> I see 1/2 but no 2/2, presumably this missing patch is the PIE one?
>>>
>>> Ross
>>>> On Thu, 15 Nov 2018 at 16:04, Samuli Piippo <samuli.piippo@qt.io> wrote:
>>>>
>>>> Use the winpthreads library available in the mingw64 and
>>>> change the thread model from win32 to posix to get access
>>>> to c++11 features.
>>>>
>>>> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>>>> ---
>>>> conf/machine-sdk/include/mingw32-common.inc   |  2 -
>>>> recipes-core/gettext/gettext_0.19.%.bbappend  |  5 +-
>>>> recipes-devtools/gcc/gcc-runtime_%.bbappend   |  2 +-
>>>> recipes-devtools/gcc/libgcc_%.bbappend        |  2 +
>>>> .../nativesdk-mingw-w64-headers_5.0.3.bb      |  5 ++
>>>> .../nativesdk-mingw-w64-winpthreads_5.0.3.bb  | 31 ++++++++++++
>>>> .../pthreads-win32/pthreads-win32_2.9.1.bb    | 47 -------------------
>>>> 7 files changed, 40 insertions(+), 54 deletions(-)
>>>> create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> delete mode 100644 recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>>
>>>> diff --git a/conf/machine-sdk/include/mingw32-common.inc b/conf/machine-sdk/include/mingw32-common.inc
>>>> index cd56380..733d092 100644
>>>> --- a/conf/machine-sdk/include/mingw32-common.inc
>>>> +++ b/conf/machine-sdk/include/mingw32-common.inc
>>>> @@ -1,8 +1,6 @@
>>>> SDK_OS = "mingw32"
>>>> NATIVESDKLIBC = "libc-mingw"
>>>>
>>>> -GCCTHREADS_mingw32 = "win32"
>>>> -
>>>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc_mingw32 = "nativesdk-mingw-w64-runtime"
>>>> PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial_mingw32 = "nativesdk-mingw-w64-runtime"
>>>> PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime"
>>>> diff --git a/recipes-core/gettext/gettext_0.19.%.bbappend b/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> index b26b734..21749f3 100644
>>>> --- a/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> +++ b/recipes-core/gettext/gettext_0.19.%.bbappend
>>>> @@ -1,7 +1,4 @@
>>>> -DEPENDS_append_mingw32 = " pthreads-win32"
>>>> -LDFLAGS_prepend_mingw32 = " -lpthread "
>>>> -
>>>> -EXTRA_OECONF_append_mingw32 = " --enable-threads=windows --enable-static"
>>>> +EXTRA_OECONF_append_mingw32 = " --enable-static"
>>>>
>>>> FILESEXTRAPATHS_prepend_mingw32 := "${THISDIR}/${BPN}:"
>>>> SRC_URI_append_mingw32 = " \
>>>> diff --git a/recipes-devtools/gcc/gcc-runtime_%.bbappend b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> index 1641cb9..f14edf1 100644
>>>> --- a/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> +++ b/recipes-devtools/gcc/gcc-runtime_%.bbappend
>>>> @@ -11,4 +11,4 @@ RUNTIMETARGET_remove_mingw32 = "libitm"
>>>> # mingw builds
>>>> RUNTIMETARGET_remove_mingw32 = "libmpx"
>>>>
>>>> -DEPENDS_append_mingw32 = " pthreads-win32"
>>>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>>>> diff --git a/recipes-devtools/gcc/libgcc_%.bbappend b/recipes-devtools/gcc/libgcc_%.bbappend
>>>> index 2a95d02..f542cfc 100644
>>>> --- a/recipes-devtools/gcc/libgcc_%.bbappend
>>>> +++ b/recipes-devtools/gcc/libgcc_%.bbappend
>>>> @@ -1,3 +1,5 @@
>>>> +DEPENDS_append_mingw32 = " nativesdk-mingw-w64-winpthreads"
>>>> +
>>>> FILES_${PN}_append_mingw32 = " ${bindir}/libgcc*.dll"
>>>> FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a"
>>>>
>>>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> index e129c32..009e5af 100644
>>>> --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb
>>>> @@ -31,4 +31,9 @@ do_compile() {
>>>>       :
>>>> }
>>>>
>>>> +do_install_append() {
>>>> +    # install correct pthread headers
>>>> +    install -m 0644 -t ${D}${includedir} ${S}/../mingw-w64-libraries/winpthreads/include/*.h
>>>> +}
>>>> +
>>>> FILES_${PN} += "${exec_prefix}/${TARGET_SYS}"
>>>> diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> new file mode 100644
>>>> index 0000000..1308760
>>>> --- /dev/null
>>>> +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_5.0.3.bb
>>>> @@ -0,0 +1,31 @@
>>>> +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project"
>>>> +LICENSE = "ZPL-2.1"
>>>> +LIC_FILES_CHKSUM = "file://../../COPYING;md5=bb936f0e04d8f1e19ad545100cee9654"
>>>> +
>>>> +COMPATIBLE_HOST = ".*-mingw.*"
>>>> +
>>>> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2"
>>>> +SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
>>>> +SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"
>>>> +
>>>> +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-libraries/winpthreads"
>>>> +B = "${WORKDIR}/build-${TARGET_SYS}"
>>>> +
>>>> +inherit autotools nativesdk
>>>> +
>>>> +INHIBIT_DEFAULT_DEPS = "1"
>>>> +DEPENDS = "nativesdk-mingw-w64-runtime virtual/${TARGET_PREFIX}gcc-initial"
>>>> +
>>>> +do_configure() {
>>>> +    oe_runconf
>>>> +}
>>>> +
>>>> +STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
>>>> +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${SDK_SYS}"
>>>> +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
>>>> +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
>>>> +
>>>> +do_install_append() {
>>>> +    # headers are already installed by mingw-w64-headers
>>>> +    rm -rf ${D}${includedir}
>>>> +}
>>>> diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>> deleted file mode 100644
>>>> index e4a0f80..0000000
>>>> --- a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb
>>>> +++ /dev/null
>>>> @@ -1,47 +0,0 @@
>>>> -DESCRIPTION = "A Win32 implementation of the POSIX standard threads API"
>>>> -HOMEPAGE = "http://www.sourceware.org/pthreads-win32"
>>>> -LICENSE = "LGPLv2.1"
>>>> -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
>>>> -
>>>> -BBCLASSEXTEND = "nativesdk"
>>>> -
>>>> -COMPATIBLE_HOST = ".*-mingw.*"
>>>> -
>>>> -## Replace dots with dashes
>>>> -PVdash = "2-9-1"
>>>> -
>>>> -## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads
>>>> -SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz"
>>>> -SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3"
>>>> -SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d"
>>>> -
>>>> -## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch
>>>> -#SRC_URI += "file://w64sup.patch"
>>>> -
>>>> -S = "${WORKDIR}/pthreads-w32-${PVdash}-release"
>>>> -
>>>> -INHIBIT_DEFAULT_DEPS = "1"
>>>> -DEPENDS = "virtual/${SDK_PREFIX}gcc libgcc virtual/libc"
>>>> -
>>>> -do_configure_prepend() {
>>>> -    ## First reset all permissions because all are executable
>>>> -    find . -type f -exec chmod 644 {} \;
>>>> -    ## Make a copy of config.h
>>>> -    cp config.h pthreads_win32_config.h
>>>> -}
>>>> -
>>>> -do_compile() {
>>>> -    make -f GNUmakefile CROSS=${SDK_PREFIX} CC="${CC}" RC="${WINDRES}" clean GC
>>>> -}
>>>> -
>>>> -do_install() {
>>>> -    install -d -m 0755 ${D}${bindir}
>>>> -    install -d -m 0755 ${D}${includedir}
>>>> -    install -d -m 0755 ${D}${libdir}
>>>> -
>>>> -    install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/
>>>> -
>>>> -    install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a
>>>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll
>>>> -    install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/pthreadGC2.dll
>>>> -}
>>>> --
>>>> 2.17.1
>>>>
>>>> --
>>>> _______________________________________________
>>>> yocto mailing list
>>>> yocto@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/yocto

[-- Attachment #2: Type: text/html, Size: 14620 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
  2018-11-15  9:29 ` [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake Samuli Piippo
@ 2018-11-16  3:35   ` Joshua Watt
  2018-11-16  6:33     ` Samuli Piippo
  2018-11-20 10:51   ` [meta-mingw][PATCH v2 " Samuli Piippo
  1 sibling, 1 reply; 12+ messages in thread
From: Joshua Watt @ 2018-11-16  3:35 UTC (permalink / raw)
  To: samuli.piippo; +Cc: Yocto list discussion

On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.piippo@qt.io> wrote:
>
> Build nativesdk-cmake and dependency libs without without openssl.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
>  .../nativesdk-packagegroup-sdk-host.bbappend              | 1 +
>  recipes-devtools/cmake/cmake_%.bbappend                   | 8 ++++++++
>  recipes-extended/libarchive/libarchive_%.bbappend         | 1 +
>  recipes-support/curl/curl_%.bbappend                      | 2 ++
>  4 files changed, 12 insertions(+)
>  create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
>  create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
>  create mode 100644 recipes-support/curl/curl_%.bbappend
>
> diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> index ad69b13..9544ffb 100644
> --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\
>      nativesdk-pkgconfig \
>      nativesdk-libtool \
>      nativesdk-qemu \
> +    nativesdk-cmake \

Have you been successful at getting cmake to work properly in MinGW?
I've been working on automated tests for the SDK, and for kicks I
pulled in your changes and tried to write a test for cmake (heavily
borrowed from the cmake/assimp test in oe-core). When I ran the test,
I got the following:

--- snip ---

-- Building for: NMake Makefiles
-- The C compiler identification is GNU 8.2.0
CMake Error at Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
(set):
  Syntax error in cmake code at

    Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2

  when parsing string

      -m32 -march=i586
--sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux

  Invalid escape sequence \p
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

--- snip ---

It looks like cmake doesn't like the Windows style slashes in CFLAGS.

You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's
still in progress so it might be a bit of work if you want to try it
yourself.

>      "
> diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
> new file mode 100644
> index 0000000..f76cd82
> --- /dev/null
> +++ b/recipes-devtools/cmake/cmake_%.bbappend
> @@ -0,0 +1,8 @@
> +DEPENDS_remove_mingw32 = "ncurses"
> +
> +cmake_do_generate_toolchain_file_append_mingw32() {
> +    cat >> ${WORKDIR}/toolchain.cmake <<EOF
> +set( CMAKE_SYSTEM_NAME Windows )
> +EOF
> +}
> +
> diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
> new file mode 100644
> index 0000000..a411b40
> --- /dev/null
> +++ b/recipes-extended/libarchive/libarchive_%.bbappend
> @@ -0,0 +1 @@
> +EXTRA_OECONF_append_mingw32 = " --without-cng"
> diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend
> new file mode 100644
> index 0000000..7865b46
> --- /dev/null
> +++ b/recipes-support/curl/curl_%.bbappend
> @@ -0,0 +1,2 @@
> +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
> +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
> --
> 2.17.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
  2018-11-16  3:35   ` Joshua Watt
@ 2018-11-16  6:33     ` Samuli Piippo
  2018-11-19 21:31       ` Joshua Watt
  0 siblings, 1 reply; 12+ messages in thread
From: Samuli Piippo @ 2018-11-16  6:33 UTC (permalink / raw)
  To: Joshua Watt; +Cc: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 4633 bytes --]

I've been testing cmake with Qt Creator integration which explicitly uses -G "MinGW Makefiles", while cmake defaults to NMake Makefiles. I'm not sure if it's possible to set generator in the toolchain file.


________________________________
From: Joshua Watt <jpewhacker@gmail.com>
Sent: 16 November 2018 05:35:50
To: Samuli Piippo
Cc: Yocto list discussion
Subject: Re: [yocto] [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake

On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.piippo@qt.io> wrote:
>
> Build nativesdk-cmake and dependency libs without without openssl.
>
> Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> ---
>  .../nativesdk-packagegroup-sdk-host.bbappend              | 1 +
>  recipes-devtools/cmake/cmake_%.bbappend                   | 8 ++++++++
>  recipes-extended/libarchive/libarchive_%.bbappend         | 1 +
>  recipes-support/curl/curl_%.bbappend                      | 2 ++
>  4 files changed, 12 insertions(+)
>  create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
>  create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
>  create mode 100644 recipes-support/curl/curl_%.bbappend
>
> diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> index ad69b13..9544ffb 100644
> --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\
>      nativesdk-pkgconfig \
>      nativesdk-libtool \
>      nativesdk-qemu \
> +    nativesdk-cmake \

Have you been successful at getting cmake to work properly in MinGW?
I've been working on automated tests for the SDK, and for kicks I
pulled in your changes and tried to write a test for cmake (heavily
borrowed from the cmake/assimp test in oe-core). When I ran the test,
I got the following:

--- snip ---

-- Building for: NMake Makefiles
-- The C compiler identification is GNU 8.2.0
CMake Error at Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
(set):
  Syntax error in cmake code at

    Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2

  when parsing string

      -m32 -march=i586
--sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux

  Invalid escape sequence \p
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)

--- snip ---

It looks like cmake doesn't like the Windows style slashes in CFLAGS.

You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's
still in progress so it might be a bit of work if you want to try it
yourself.

>      "
> diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
> new file mode 100644
> index 0000000..f76cd82
> --- /dev/null
> +++ b/recipes-devtools/cmake/cmake_%.bbappend
> @@ -0,0 +1,8 @@
> +DEPENDS_remove_mingw32 = "ncurses"
> +
> +cmake_do_generate_toolchain_file_append_mingw32() {
> +    cat >> ${WORKDIR}/toolchain.cmake <<EOF
> +set( CMAKE_SYSTEM_NAME Windows )
> +EOF
> +}
> +
> diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
> new file mode 100644
> index 0000000..a411b40
> --- /dev/null
> +++ b/recipes-extended/libarchive/libarchive_%.bbappend
> @@ -0,0 +1 @@
> +EXTRA_OECONF_append_mingw32 = " --without-cng"
> diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend
> new file mode 100644
> index 0000000..7865b46
> --- /dev/null
> +++ b/recipes-support/curl/curl_%.bbappend
> @@ -0,0 +1,2 @@
> +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
> +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
> --
> 2.17.1
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
yocto Info Page<https://lists.yoctoproject.org/listinfo/yocto>
lists.yoctoproject.org
Discussion of all things about the Yocto Project. Read our Community Guidelines or learn more about how to participate in other community discussions. Subscribe before posting to bypass moderation. To see the collection of prior postings to the list, visit the yocto Archives.. Using yocto




[-- Attachment #2: Type: text/html, Size: 9034 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
  2018-11-16  6:33     ` Samuli Piippo
@ 2018-11-19 21:31       ` Joshua Watt
  2018-11-20  5:14         ` Samuli Piippo
  0 siblings, 1 reply; 12+ messages in thread
From: Joshua Watt @ 2018-11-19 21:31 UTC (permalink / raw)
  To: samuli.piippo; +Cc: Yocto list discussion

[-- Attachment #1: Type: text/plain, Size: 6506 bytes --]

On Fri, Nov 16, 2018 at 12:33 AM Samuli Piippo <samuli.piippo@qt.io> wrote:

> I've been testing cmake with Qt Creator integration which explicitly uses
> -G "MinGW Makefiles", while cmake defaults to NMake Makefiles. I'm not
> sure if it's possible to set generator in the toolchain file.
>

Hmm, so perhaps Qt creator isn't using %CC% %CFLAGS% & friends? Did you
manually configure it to pass the right arguments to the compiler (e.g.
path to sysroot and such)? That might explain why it works for you since
AFAIK, cmake can't handle "\" as a path separator, and that is what our
environment setup script uses.

I'm not specifically opposed to adding cmake to the SDK (I think it's
probably a good idea even), but if we are adding it to the default SDK (
nativesdk-packagegroup-sdk-host) I think it would be wise for it to work as
expected (e.g. work like it does in the Linux SDK). Fortunately, your
patches sent me off on a deeper tangent in my quest for automated testing
of the MinGW SDK, and I believe I have actually done a significant amount
of the work required to facilitate getting cmake working "as expected". You
can take a look at my patches on the jpew/oeqa branch in
meta-mingw-contrib. For the most part, the changes aren't too bad; the only
one that really scares me is the change to make the toolchain batch files
use the unix path seperator (/) instead of the Windows separator (\)
("classes/toolchain-scripts-mingw32: Use Unix path separators"). I don't
really know enough about cmake, so perhaps there is some better (cmake
specific) mechanism that we can use instead?

Just to be clear, I don't mind the changes you made to make cmake build,
but I would prefer to not add it to the SDK by default until it actually
works with the SDK (and preferably has some test cases ;).



>
> ------------------------------
> *From:* Joshua Watt <jpewhacker@gmail.com>
> *Sent:* 16 November 2018 05:35:50
> *To:* Samuli Piippo
> *Cc:* Yocto list discussion
> *Subject:* Re: [yocto] [meta-mingw][PATCH 2/2] cmake: add support for
> building nativesdk-cmake
>
> On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.piippo@qt.io> wrote:
> >
> > Build nativesdk-cmake and dependency libs without without openssl.
> >
> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
> > ---
> >  .../nativesdk-packagegroup-sdk-host.bbappend              | 1 +
> >  recipes-devtools/cmake/cmake_%.bbappend                   | 8 ++++++++
> >  recipes-extended/libarchive/libarchive_%.bbappend         | 1 +
> >  recipes-support/curl/curl_%.bbappend                      | 2 ++
> >  4 files changed, 12 insertions(+)
> >  create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
> >  create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
> >  create mode 100644 recipes-support/curl/curl_%.bbappend
> >
> > diff --git
> a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> > index ad69b13..9544ffb 100644
> > --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> > +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
> > @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\
> >      nativesdk-pkgconfig \
> >      nativesdk-libtool \
> >      nativesdk-qemu \
> > +    nativesdk-cmake \
>
> Have you been successful at getting cmake to work properly in MinGW?
> I've been working on automated tests for the SDK, and for kicks I
> pulled in your changes and tried to write a test for cmake (heavily
> borrowed from the cmake/assimp test in oe-core). When I ran the test,
> I got the following:
>
> --- snip ---
>
> -- Building for: NMake Makefiles
> -- The C compiler identification is GNU 8.2.0
> CMake Error at
> Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
> (set):
>   Syntax error in cmake code at
>
>
> Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
>
>   when parsing string
>
>       -m32 -march=i586
>
> --sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux
>
>   Invalid escape sequence \p
> Call Stack (most recent call first):
>   CMakeLists.txt:38 (PROJECT)
>
> --- snip ---
>
> It looks like cmake doesn't like the Windows style slashes in CFLAGS.
>
> You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's
> still in progress so it might be a bit of work if you want to try it
> yourself.
>
> >      "
> > diff --git a/recipes-devtools/cmake/cmake_%.bbappend
> b/recipes-devtools/cmake/cmake_%.bbappend
> > new file mode 100644
> > index 0000000..f76cd82
> > --- /dev/null
> > +++ b/recipes-devtools/cmake/cmake_%.bbappend
> > @@ -0,0 +1,8 @@
> > +DEPENDS_remove_mingw32 = "ncurses"
> > +
> > +cmake_do_generate_toolchain_file_append_mingw32() {
> > +    cat >> ${WORKDIR}/toolchain.cmake <<EOF
> > +set( CMAKE_SYSTEM_NAME Windows )
> > +EOF
> > +}
> > +
> > diff --git a/recipes-extended/libarchive/libarchive_%.bbappend
> b/recipes-extended/libarchive/libarchive_%.bbappend
> > new file mode 100644
> > index 0000000..a411b40
> > --- /dev/null
> > +++ b/recipes-extended/libarchive/libarchive_%.bbappend
> > @@ -0,0 +1 @@
> > +EXTRA_OECONF_append_mingw32 = " --without-cng"
> > diff --git a/recipes-support/curl/curl_%.bbappend
> b/recipes-support/curl/curl_%.bbappend
> > new file mode 100644
> > index 0000000..7865b46
> > --- /dev/null
> > +++ b/recipes-support/curl/curl_%.bbappend
> > @@ -0,0 +1,2 @@
> > +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
> > +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
> > --
> > 2.17.1
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> yocto Info Page <https://lists.yoctoproject.org/listinfo/yocto>
> lists.yoctoproject.org
> Discussion of all things about the Yocto Project. Read our Community
> Guidelines or learn more about how to participate in other community
> discussions. Subscribe before posting to bypass moderation. To see the
> collection of prior postings to the list, visit the yocto Archives.. Using
> yocto
>
>
>

[-- Attachment #2: Type: text/html, Size: 12238 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
  2018-11-19 21:31       ` Joshua Watt
@ 2018-11-20  5:14         ` Samuli Piippo
  0 siblings, 0 replies; 12+ messages in thread
From: Samuli Piippo @ 2018-11-20  5:14 UTC (permalink / raw)
  To: jpewhacker; +Cc: yocto

Yeah, it was bad testing on my part, cmake really isn't ready for
prime-time until it works correctly from with the environment-setup
script.

I have enabled cmake on our sumo based SDK, where it works nicely with
the Qt Creator integration. It also builds there without the
winpthreads change. On thud, cmake was updated and now requires the
c++11 features from pthreads, which was more or less why I started
pushing these changes.

I'll update the patch and remove cmake from the packagegroup again.


On Mon, 19 Nov 2018 at 23:33, Joshua Watt <jpewhacker@gmail.com> wrote:
>
>
>
> On Fri, Nov 16, 2018 at 12:33 AM Samuli Piippo <samuli.piippo@qt.io> wrote:
>>
>> I've been testing cmake with Qt Creator integration which explicitly uses -G "MinGW Makefiles", while cmake defaults to NMake Makefiles. I'm not sure if it's possible to set generator in the toolchain file.
>
>
> Hmm, so perhaps Qt creator isn't using %CC% %CFLAGS% & friends? Did you manually configure it to pass the right arguments to the compiler (e.g. path to sysroot and such)? That might explain why it works for you since AFAIK, cmake can't handle "\" as a path separator, and that is what our environment setup script uses.
>
> I'm not specifically opposed to adding cmake to the SDK (I think it's probably a good idea even), but if we are adding it to the default SDK (nativesdk-packagegroup-sdk-host) I think it would be wise for it to work as expected (e.g. work like it does in the Linux SDK). Fortunately, your patches sent me off on a deeper tangent in my quest for automated testing of the MinGW SDK, and I believe I have actually done a significant amount of the work required to facilitate getting cmake working "as expected". You can take a look at my patches on the jpew/oeqa branch in meta-mingw-contrib. For the most part, the changes aren't too bad; the only one that really scares me is the change to make the toolchain batch files use the unix path seperator (/) instead of the Windows separator (\) ("classes/toolchain-scripts-mingw32: Use Unix path separators"). I don't really know enough about cmake, so perhaps there is some better (cmake specific) mechanism that we can use instead?
>
> Just to be clear, I don't mind the changes you made to make cmake build, but I would prefer to not add it to the SDK by default until it actually works with the SDK (and preferably has some test cases ;).
>
>
>>
>>
>> ________________________________
>> From: Joshua Watt <jpewhacker@gmail.com>
>> Sent: 16 November 2018 05:35:50
>> To: Samuli Piippo
>> Cc: Yocto list discussion
>> Subject: Re: [yocto] [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake
>>
>> On Thu, Nov 15, 2018 at 7:22 PM Samuli Piippo <samuli.piippo@qt.io> wrote:
>> >
>> > Build nativesdk-cmake and dependency libs without without openssl.
>> >
>> > Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
>> > ---
>> >  .../nativesdk-packagegroup-sdk-host.bbappend              | 1 +
>> >  recipes-devtools/cmake/cmake_%.bbappend                   | 8 ++++++++
>> >  recipes-extended/libarchive/libarchive_%.bbappend         | 1 +
>> >  recipes-support/curl/curl_%.bbappend                      | 2 ++
>> >  4 files changed, 12 insertions(+)
>> >  create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
>> >  create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
>> >  create mode 100644 recipes-support/curl/curl_%.bbappend
>> >
>> > diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
>> > index ad69b13..9544ffb 100644
>> > --- a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
>> > +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend
>> > @@ -2,4 +2,5 @@ RDEPENDS_${PN}_mingw32 = "\
>> >      nativesdk-pkgconfig \
>> >      nativesdk-libtool \
>> >      nativesdk-qemu \
>> > +    nativesdk-cmake \
>>
>> Have you been successful at getting cmake to work properly in MinGW?
>> I've been working on automated tests for the SDK, and for kicks I
>> pulled in your changes and tried to write a test for cmake (heavily
>> borrowed from the cmake/assimp test in oe-core). When I ran the test,
>> I got the following:
>>
>> --- snip ---
>>
>> -- Building for: NMake Makefiles
>> -- The C compiler identification is GNU 8.2.0
>> CMake Error at Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
>> (set):
>>   Syntax error in cmake code at
>>
>>     Z:/projects/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testimage-sdk/CMakeTest-zljaq7x7/build/CMakeFiles/3.12.2/CMakeCCompiler.cmake:2
>>
>>   when parsing string
>>
>>       -m32 -march=i586
>> --sysroot=Z:\projects\poky\build\tmp\work\QEMU~ELC\CORE~B5D\1~~~~N25.0-R\TEST~Y0Z\\sysroots\i586-poky-linux
>>
>>   Invalid escape sequence \p
>> Call Stack (most recent call first):
>>   CMakeLists.txt:38 (PROJECT)
>>
>> --- snip ---
>>
>> It looks like cmake doesn't like the Windows style slashes in CFLAGS.
>>
>> You can see my test branch at jpew/oeqa in meta-mingw-contrib... it's
>> still in progress so it might be a bit of work if you want to try it
>> yourself.
>>
>> >      "
>> > diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
>> > new file mode 100644
>> > index 0000000..f76cd82
>> > --- /dev/null
>> > +++ b/recipes-devtools/cmake/cmake_%.bbappend
>> > @@ -0,0 +1,8 @@
>> > +DEPENDS_remove_mingw32 = "ncurses"
>> > +
>> > +cmake_do_generate_toolchain_file_append_mingw32() {
>> > +    cat >> ${WORKDIR}/toolchain.cmake <<EOF
>> > +set( CMAKE_SYSTEM_NAME Windows )
>> > +EOF
>> > +}
>> > +
>> > diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
>> > new file mode 100644
>> > index 0000000..a411b40
>> > --- /dev/null
>> > +++ b/recipes-extended/libarchive/libarchive_%.bbappend
>> > @@ -0,0 +1 @@
>> > +EXTRA_OECONF_append_mingw32 = " --without-cng"
>> > diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend
>> > new file mode 100644
>> > index 0000000..7865b46
>> > --- /dev/null
>> > +++ b/recipes-support/curl/curl_%.bbappend
>> > @@ -0,0 +1,2 @@
>> > +PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
>> > +RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
>> > --
>> > 2.17.1
>> >
>> > --
>> > _______________________________________________
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> yocto Info Page
>> lists.yoctoproject.org
>> Discussion of all things about the Yocto Project. Read our Community Guidelines or learn more about how to participate in other community discussions. Subscribe before posting to bypass moderation. To see the collection of prior postings to the list, visit the yocto Archives.. Using yocto
>>
>>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [meta-mingw][PATCH v2 2/2] cmake: add support for building nativesdk-cmake
  2018-11-15  9:29 ` [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake Samuli Piippo
  2018-11-16  3:35   ` Joshua Watt
@ 2018-11-20 10:51   ` Samuli Piippo
  1 sibling, 0 replies; 12+ messages in thread
From: Samuli Piippo @ 2018-11-20 10:51 UTC (permalink / raw)
  To: yocto

Build nativesdk-cmake and dependency libs without without openssl.

Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
---
 recipes-devtools/cmake/cmake_%.bbappend           | 7 +++++++
 recipes-extended/libarchive/libarchive_%.bbappend | 1 +
 recipes-support/curl/curl_%.bbappend              | 2 ++
 3 files changed, 10 insertions(+)
 create mode 100644 recipes-devtools/cmake/cmake_%.bbappend
 create mode 100644 recipes-extended/libarchive/libarchive_%.bbappend
 create mode 100644 recipes-support/curl/curl_%.bbappend

diff --git a/recipes-devtools/cmake/cmake_%.bbappend b/recipes-devtools/cmake/cmake_%.bbappend
new file mode 100644
index 0000000..d9d7ceb
--- /dev/null
+++ b/recipes-devtools/cmake/cmake_%.bbappend
@@ -0,0 +1,7 @@
+DEPENDS_remove_mingw32 = "ncurses"
+
+cmake_do_generate_toolchain_file_append_mingw32() {
+    cat >> ${WORKDIR}/toolchain.cmake <<EOF
+set( CMAKE_SYSTEM_NAME Windows )
+EOF
+}
diff --git a/recipes-extended/libarchive/libarchive_%.bbappend b/recipes-extended/libarchive/libarchive_%.bbappend
new file mode 100644
index 0000000..a411b40
--- /dev/null
+++ b/recipes-extended/libarchive/libarchive_%.bbappend
@@ -0,0 +1 @@
+EXTRA_OECONF_append_mingw32 = " --without-cng"
diff --git a/recipes-support/curl/curl_%.bbappend b/recipes-support/curl/curl_%.bbappend
new file mode 100644
index 0000000..7865b46
--- /dev/null
+++ b/recipes-support/curl/curl_%.bbappend
@@ -0,0 +1,2 @@
+PACKAGECONFIG_remove_class-nativesdk_mingw32 = "ssl"
+RRECOMMENDS_lib${BPN}_remove_mingw32 = "ca-certificates"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-11-20 20:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15  9:28 [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Samuli Piippo
2018-11-15  9:29 ` [meta-mingw][PATCH 2/2] cmake: add support for building nativesdk-cmake Samuli Piippo
2018-11-16  3:35   ` Joshua Watt
2018-11-16  6:33     ` Samuli Piippo
2018-11-19 21:31       ` Joshua Watt
2018-11-20  5:14         ` Samuli Piippo
2018-11-20 10:51   ` [meta-mingw][PATCH v2 " Samuli Piippo
2018-11-15 17:21 ` [meta-mingw][PATCH 1/2] winpthreads: use posix threads library from mingw64 Burton, Ross
2018-11-15 17:31   ` Samuli Piippo
2018-11-15 17:33     ` Burton, Ross
2018-11-15 17:45       ` Samuli Piippo
2018-11-15 20:38         ` Samuli Piippo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.