summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-06-07 13:01:01 +0100
committerRoss Burton <ross.burton@intel.com>2018-06-07 13:01:01 +0100
commit46b1bfd8ef26dd9c778504143d4dea2fbe2ce90f (patch)
treeafb6f137a81902fa3fd539590fd13aa02d11b394
parentfde300483f2133489c1f16b5b03a22050613787b (diff)
mingw-w64-headers: backport patch to fix build with GCC 8
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--recipes-devtools/mingw-w64/mingw-w64-headers/0001-intrin-impl.h-do-not-define-_xgetbv-for-GCC-8.patch43
-rw-r--r--recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_5.0.3.bb3
2 files changed, 45 insertions, 1 deletions
diff --git a/recipes-devtools/mingw-w64/mingw-w64-headers/0001-intrin-impl.h-do-not-define-_xgetbv-for-GCC-8.patch b/recipes-devtools/mingw-w64/mingw-w64-headers/0001-intrin-impl.h-do-not-define-_xgetbv-for-GCC-8.patch
new file mode 100644
index 0000000..366afdc
--- /dev/null
+++ b/recipes-devtools/mingw-w64/mingw-w64-headers/0001-intrin-impl.h-do-not-define-_xgetbv-for-GCC-8.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 63d69029386701955e8fa10ac14be8d2316faf6f Mon Sep 17 00:00:00 2001
+From: Mateusz <mateuszb@poczta.onet.pl>
+Date: Mon, 22 Jan 2018 20:58:48 +0100
+Subject: [PATCH] intrin-impl.h: do not define _xgetbv for GCC 8
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+GCC 8 from r248028 has defined function _xgetbv and we should
+avoid double definition of this function.
+
+Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
+Signed-off-by: Martin Storsjö <martin@martin.st>
+---
+ mingw-w64-headers/include/psdk_inc/intrin-impl.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
+index 7da3238b..4990b0ae 100644
+--- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h
++++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
+@@ -1405,6 +1405,7 @@ __buildmov(__movsd, unsigned __LONG32, "d")
+ #define __INTRINSIC_DEFINED___movsd
+ #endif /* __INTRINSIC_PROLOG */
+
++#if !defined(__GNUC__) || __GNUC__ < 8 /* GCC 8 has already defined _xgetbv */
+ /* NOTE: This should be in immintrin.h */
+ #if __INTRINSIC_PROLOG(_xgetbv)
+ unsigned __int64 _xgetbv(unsigned int);
+@@ -1426,6 +1427,7 @@ unsigned __int64 _xgetbv(unsigned int index)
+ }
+ #define __INTRINSIC_DEFINED__xgetbv
+ #endif /* __INTRINSIC_PROLOG */
++#endif /* __GNUC__ < 8 */
+
+ #endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */
+
+--
+2.11.0
+
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 3948392..e129c32 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
@@ -5,7 +5,8 @@ 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 \
- file://epsilon.patch"
+ file://epsilon.patch \
+ file://0001-intrin-impl.h-do-not-define-_xgetbv-for-GCC-8.patch;striplevel=2"
SRC_URI[md5sum] = "5524c20312560cc8683b7d8ee292cb8c"
SRC_URI[sha256sum] = "2a601db99ef579b9be69c775218ad956a24a09d7dabc9ff6c5bd60da9ccc9cb4"