<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - fix build with gcc link time optimizer"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83669#c13">Comment # 13</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - fix build with gcc link time optimizer"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83669">bug 83669</a>
              from <span class="vcard"><a class="email" href="mailto:marvin24@gmx.de" title="Marc Dietrich <marvin24@gmx.de>"> <span class="fn">Marc Dietrich</span></a>
</span></b>
        <pre>gcc/clang development is fast and also the mesa supported version numbers of
compilers are increasing. So this is a fast moving target. That said, I
currently use the _target_ attribute of gcc (not supported by clang yet AFAIK),
and add a #pragma target:

diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index 3903818..b83dc76 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -181,7 +181,9 @@ libmesagallium_la_LIBADD = \
 libmesa_sse41_la_SOURCES = \
        $(X86_SSE41_FILES)

+if !HAVE_TARGET_ATTRIBUTE
 libmesa_sse41_la_CFLAGS = $(AM_CFLAGS) $(SSE41_CFLAGS)
+endif

 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = gl.pc
diff --git a/src/mesa/main/sse_minmax.c b/src/mesa/main/sse_minmax.c
index 2e34716..5fd59fc 100644
--- a/src/mesa/main/sse_minmax.c
+++ b/src/mesa/main/sse_minmax.c
@@ -25,6 +25,7 @@
  *
  */

+#pragma GCC target ("sse4.1")
 #include "main/sse_minmax.h"
 #include <smmintrin.h>
 #include <stdint.h>
diff --git a/src/mesa/main/streaming-load-memcpy.c
b/src/mesa/main/streaming-load-memcpy.c
index 32854b6..8066954 100644
--- a/src/mesa/main/streaming-load-memcpy.c
+++ b/src/mesa/main/streaming-load-memcpy.c
@@ -26,6 +26,7 @@
  *
  */

+#pragma GCC target ("sse4.1")
 #include "main/macros.h"
 #include "main/streaming-load-memcpy.h"
 #include <smmintrin.h>


That works fine for gcc and clang so far for me. Not sure if this is a working
solution for everyone.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>