System is OpenMandriva Cooker running LLVM/clang 3.7.0 as default compiler. When i build mesa i got this error: Makefile:1205: recipe for target 'nv50/nv84_video_vp.lo' failed make[3]: Leaving directory '/builddir/build/BUILD/mesa-11.0.7/src/gallium/drivers/nouveau' In file included from nv50/nv84_video_vp.c:25: In file included from ../../../../src/gallium/auxiliary/util/u_sse.h:140: /usr/bin/../lib64/clang/3.7.0/include/tmmintrin.h:28:2: error: "SSSE3 instruction set not enabled" #error "SSSE3 instruction set not enabled" ^ 1 error generated. make[3]: *** [nv50/nv84_video_vp.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... Adding -mssse3 to CFLAGS will not work for all hardware.
Hmmm... this comes from #if defined(PIPE_ARCH_SSSE3) #include <tmmintrin.h> Which in turn comes from, hilariously, #if defined(PIPE_CC_GCC) && (__GNUC__ * 100 + __GNUC_MINOR__) < 409 && !defined(__SSSE3__) /* #warning SSE3 support requires -msse3 compiler options before GCC 4.9 */ #else #define PIPE_ARCH_SSSE3 #endif I'm guessing that was meant to be #if defined(PIPE_CC_GCC) && (__GNUC__ * 100 + __GNUC_MINOR__) < 409 || !defined(__SSSE3__)
Let me try that in src/gallium/include/pipe/p_config.h
This logic was last altered in the change below... My copy of clang 3.5 purports to be gcc 4.2.1. What does clang 3.7 report? clang -E -dM - < /dev/null | grep GNUC commit eb643db30e1bdf5171d0a012674016c317925b6e Author: Jose Fonseca <jfonseca@vmware.com> Date: Sun Aug 9 11:21:03 2015 +0100 gallium: GCC 4.9 allows to include tmmintrin.h without -msse3. Fixes build with MinGW x86_64 build with GCC 4.9, due to conflicting definition _mm_shuffle_epi8 of u_sse.h and system headers. Trivial.
(In reply to Ilia Mirkin from comment #4) > clang -E -dM - < /dev/null | grep GNUC #define __GNUC_MINOR__ 9 #define __GNUC_PATCHLEVEL__ 1 #define __GNUC_STDC_INLINE__ 1 #define __GNUC__4
The issue is simple: - GCC used to require -msse3 in order to include tmmintrin.h - MSVC/ICC does not - GCC 4.9 finally eliminated that awkward requirement -- it's now possible to use SSE3 instrinsics without giving GCC carte blanch to emit SSSE3 whenever it wants - it appears Clang claims to be GCC 4.9 but does not in fact support this. We can workaround by adding diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index 0b570c7..7d5d7d4 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -96,7 +96,7 @@ #else #define PIPE_ARCH_SSE #endif -#if defined(PIPE_CC_GCC) && (__GNUC__ * 100 + __GNUC_MINOR__) < 409 && !defined(__SSSE3__) +#if defined(PIPE_CC_GCC) && ((__GNUC__ * 100 + __GNUC_MINOR__) < 409 || defined(__clang__)) && !defined(__SSSE3__) /* #warning SSE3 support requires -msse3 compiler options before GCC 4.9 */ #else #define PIPE_ARCH_SSSE3 But this is above all a bug in Clang 3.7. If that strive/claim to be GCC 4.9 then they should handle this too.
Hi, thanks for the workaround I found this bug report https://llvm.org/bugs/show_bug.cgi?id=24990 and i was paring commits for llvm and clang and i did not found anything that would corresponds to above bug.
(In reply to Tomasz Paweł Gajc from comment #7) > Hi, thanks for the workaround > I found this bug report https://llvm.org/bugs/show_bug.cgi?id=24990 and i > was paring commits for llvm and clang and i did not found anything that > would corresponds to above bug. It looks like they had fixed this already before the bug report. From the git history, the fix is https://github.com/llvm-mirror/clang/commit/41885d36e85ead75a1d18ef7d2f43663f90ed67e Not sure what clang version got it in the end. But given this has already been fixed in Clang, I think we shouldn't fix it in Mesa, otherwise we'll need complex logic to detect exactly which clang versions support or not this. OpenMandriva Cooker made the decision to use LLVM/clang 3.7.0 as default compiler, so they should crossport any fixes necessary to keep light on.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.