From 4b36bbad7a62abf5af0edd23384fe2aaf30361ed Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 12 Feb 2022 10:42:59 -0800 Subject: mingw-w64: Upgrade runtime/headers/winpthreads to 9.0.0 Drop upstreamed fixes for rdtsc [1] __udivmoddi4[2] [1] https://sourceforge.net/p/mingw-w64/mingw-w64/ci/6a0e9165008f731bccadfc41a59719cf7c8efc02/ [2] https://sourceforge.net/p/mingw-w64/mingw-w64/ci/ab0fa5ad3c67d634fd7754d9473d1bb7051f9bf0/ Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- ...1-intrincs-Check-for-__builtin_ia32_rdtsc.patch | 33 -------------- .../files/0001-winpthreads-Add-__udivmoddi4.patch | 52 ---------------------- recipes-devtools/mingw-w64/mingw-w64.inc | 4 +- .../mingw-w64/nativesdk-mingw-w64-headers_8.0.0.bb | 26 ----------- .../mingw-w64/nativesdk-mingw-w64-headers_9.0.0.bb | 26 +++++++++++ .../mingw-w64/nativesdk-mingw-w64-runtime_8.0.0.bb | 31 ------------- .../mingw-w64/nativesdk-mingw-w64-runtime_9.0.0.bb | 29 ++++++++++++ .../nativesdk-mingw-w64-winpthreads_8.0.0.bb | 24 ---------- .../nativesdk-mingw-w64-winpthreads_9.0.0.bb | 22 +++++++++ 9 files changed, 78 insertions(+), 169 deletions(-) delete mode 100644 recipes-devtools/mingw-w64/files/0001-intrincs-Check-for-__builtin_ia32_rdtsc.patch delete mode 100644 recipes-devtools/mingw-w64/files/0001-winpthreads-Add-__udivmoddi4.patch delete mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_8.0.0.bb create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_9.0.0.bb delete mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_8.0.0.bb create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_9.0.0.bb delete mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_8.0.0.bb create mode 100644 recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_9.0.0.bb diff --git a/recipes-devtools/mingw-w64/files/0001-intrincs-Check-for-__builtin_ia32_rdtsc.patch b/recipes-devtools/mingw-w64/files/0001-intrincs-Check-for-__builtin_ia32_rdtsc.patch deleted file mode 100644 index ce4ba81..0000000 --- a/recipes-devtools/mingw-w64/files/0001-intrincs-Check-for-__builtin_ia32_rdtsc.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 346de7591f58015d111f4d4f3b001382c04d5557 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 13 Apr 2021 18:44:25 -0700 -Subject: [PATCH] intrincs: Check for __builtin_ia32_rdtsc - -on modern gcc ( >=4.6 ) __rdtsc function is implemented using -special builtin function called __builtin_ia32_rdtsc, its actually -a define in gcc, so __has_builtin check fails for __rdtsc even -though it is defined to imply __builtin_ia32_rdtsc(), therefore -check for existence of __builtin_ia32_rdtsc as well - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - mingw-w64-crt/intrincs/rdtsc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c -index bf9c03b..df04711 100644 ---- a/mingw-w64-crt/intrincs/rdtsc.c -+++ b/mingw-w64-crt/intrincs/rdtsc.c -@@ -11,7 +11,7 @@ - #define __has_builtin(x) 0 - #endif - --#if !__has_builtin(__rdtsc) -+#if !__has_builtin(__rdtsc) && !__has_builtin(__builtin_ia32_rdtsc) - unsigned __int64 __rdtsc(void) - { - #ifdef _WIN64 --- -2.31.1 - diff --git a/recipes-devtools/mingw-w64/files/0001-winpthreads-Add-__udivmoddi4.patch b/recipes-devtools/mingw-w64/files/0001-winpthreads-Add-__udivmoddi4.patch deleted file mode 100644 index 3eb298e..0000000 --- a/recipes-devtools/mingw-w64/files/0001-winpthreads-Add-__udivmoddi4.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 3b0af7327446ae179dc93b6a6ab1074251d348d0 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 30 Apr 2021 16:50:36 -0700 -Subject: [PATCH] winpthreads: Add __udivmoddi4 - -Newer GCC ( 11.1.0+ ) is generating calls to __udivmoddi4 on i686 -architecture, therefore provide an implementation to avoid undefined -references - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - .../winpthreads/src/libgcc/dll_math.c | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index aeec068..d170967 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -121,6 +121,7 @@ u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); - quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); -+u_quad_t __udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -573,7 +574,20 @@ __divmoddi4(a, b, rem) - return (negq ? -uq : uq); - } - -+/* -+ * Divide two unsigned quads. -+ * This function is new in GCC 7. -+ */ -+u_quad_t -+__udivmoddi4(a, b, rem) -+ u_quad_t a, b, *rem; -+{ -+ u_quad_t q = __udivdi3(a, b); -+ if (rem) -+ *rem = a - b * q; -+ return q; -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ -- --- -2.31.1 - diff --git a/recipes-devtools/mingw-w64/mingw-w64.inc b/recipes-devtools/mingw-w64/mingw-w64.inc index d40d4a5..322fb79 100644 --- a/recipes-devtools/mingw-w64/mingw-w64.inc +++ b/recipes-devtools/mingw-w64/mingw-w64.inc @@ -5,9 +5,7 @@ COMPATIBLE_HOST = ".*-mingw.*" SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.bz2" -SRC_URI[sha256sum] = "44c740ea6ab3924bc3aa169bad11ad3c5766c5c8459e3126d44eabb8735a5762" +SRC_URI[sha256sum] = "1929b94b402f5ff4d7d37a9fe88daa9cc55515a6134805c104d1794ae22a4181" UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release/" UPSTREAM_CHECK_REGEX = "mingw-w64-v(?P(\d+[\.\-_]*)+)\.tar" - - diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_8.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_8.0.0.bb deleted file mode 100644 index 68e77fa..0000000 --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_8.0.0.bb +++ /dev/null @@ -1,26 +0,0 @@ -DESCRIPTION = "Header files from the MingGW-w64 project" - -require mingw-w64.inc - -S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-headers" -B = "${WORKDIR}/build-${TARGET_SYS}" - -inherit autotools nativesdk - -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "" - -do_configure() { - oe_runconf -} - -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-headers_9.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_9.0.0.bb new file mode 100644 index 0000000..68e77fa --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_9.0.0.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Header files from the MingGW-w64 project" + +require mingw-w64.inc + +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-headers" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools nativesdk + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "" + +do_configure() { + oe_runconf +} + +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-runtime_8.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_8.0.0.bb deleted file mode 100644 index 02132c1..0000000 --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_8.0.0.bb +++ /dev/null @@ -1,31 +0,0 @@ -DESCRIPTION = "Runtime libraries from MinGW-w64 project" - -require mingw-w64.inc - -SRC_URI += "file://0001-intrincs-Check-for-__builtin_ia32_rdtsc.patch;striplevel=2" - -S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-crt" -B = "${WORKDIR}/build-${TARGET_SYS}" - -inherit autotools nativesdk - -BUILDSDK_CPPFLAGS:append = " -isystem${STAGING_INCDIR}" - -INHIBIT_DEFAULT_DEPS = "1" -DEPENDS = "nativesdk-mingw-w64-headers virtual/${TARGET_PREFIX}gcc " - -PROVIDES += "virtual/nativesdk-libc" - -# Work around pulling in eglibc for now... -PROVIDES += "virtual/nativesdk-libintl" - -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" - -EXTRA_OECONF:x86-64 = "--disable-lib32" - -do_configure() { - oe_runconf -} - -FILES:${PN} += "${exec_prefix}/libsrc" - diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_9.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_9.0.0.bb new file mode 100644 index 0000000..e2ca6a5 --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_9.0.0.bb @@ -0,0 +1,29 @@ +DESCRIPTION = "Runtime libraries from MinGW-w64 project" + +require mingw-w64.inc + +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-crt" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools nativesdk + +BUILDSDK_CPPFLAGS:append = " -isystem${STAGING_INCDIR}" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "nativesdk-mingw-w64-headers virtual/${TARGET_PREFIX}gcc " + +PROVIDES += "virtual/nativesdk-libc" + +# Work around pulling in eglibc for now... +PROVIDES += "virtual/nativesdk-libintl" + +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" + +EXTRA_OECONF:x86-64 = "--disable-lib32" + +do_configure() { + oe_runconf +} + +FILES:${PN} += "${exec_prefix}/libsrc" + diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_8.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_8.0.0.bb deleted file mode 100644 index 38092dc..0000000 --- a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_8.0.0.bb +++ /dev/null @@ -1,24 +0,0 @@ -DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project" - -require mingw-w64.inc - -SRC_URI += "file://0001-winpthreads-Add-__udivmoddi4.patch;striplevel=3" - -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" - -do_configure() { - oe_runconf -} - -TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" - -do_install:append() { - # headers are already installed by mingw-w64-headers - rm -rf ${D}${includedir} -} diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_9.0.0.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_9.0.0.bb new file mode 100644 index 0000000..fb7e54e --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-winpthreads_9.0.0.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Winpthreads runtime libraries from MinGW-w64 project" + +require mingw-w64.inc + +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" + +do_configure() { + oe_runconf +} + +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" + +do_install:append() { + # headers are already installed by mingw-w64-headers + rm -rf ${D}${includedir} +} -- cgit v1.2.3-54-g00ecf