On Mon, 29 Mar 2021, Mateusz Mikuła wrote:

See https://github.com/msys2/CLANG-packages/issues/6 for the details
---
mingw-w64-headers/crt/intrin.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-headers/crt/intrin.h b/mingw-w64-headers/crt/intrin.h
index 4e840fab..250c25b2 100644
--- a/mingw-w64-headers/crt/intrin.h
+++ b/mingw-w64-headers/crt/intrin.h
@@ -47,10 +47,10 @@
 * C++ linkage (when GCC headers are explicitly included before intrin.h),
but at least their
 * guards will prevent duplicated declarations and avoid conflicts.
 *
- * On GCC 4.9 we may always include those headers. On older GCCs, we may
do it only if CPU
+ * On GCC 4.9 and Clang we may always include those headers. On older
GCCs, we may do it only if CPU
 * features used by them are enabled, so we need to check macros like
__SSE__ or __MMX__ first.
 */
-#if __MINGW_GNUC_PREREQ(4, 9)
+#if __MINGW_GNUC_PREREQ(4, 9) || defined(__clang__)
#define __MINGW_FORCE_SYS_INTRINS
#endif

--
2.30.2.windows.1

Thanks, this patch looks good to me, but it'd be nice to include a bit more details in the commit message, i.e. indicating that our definition of e.g. __m64 (which we include if __MMX__ isn't defined) conflicts with the one from mmintrin.h, which is included implicitly via x86intrin.h. With clang, it seems to be ok to include the *mmintrin.h headers even for instruction sets not currently enabled, e.g. if building with -march=i686 which disables MMX and SSE, which otherwise normally are enabled.


// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to