<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#c7">Comment # 7</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>turns out that we need to specify -msse4.1 to certain LDFLAGS (patch below),
but I guess this crashes on platforms not supporting sse4.1.

diff --git a/src/gallium/targets/dri/Makefile.am
b/src/gallium/targets/dri/Makefile.am
index 1c33a91..e8b691f 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -38,6 +38,10 @@ gallium_dri_la_LDFLAGS += \
        -Wl,--dynamic-list=$(top_srcdir)/src/gallium/targets/dri-vdpau.dyn
 endif # HAVE_LD_DYNAMIC_LIST

+if SSE41_SUPPORTED
+gallium_dri_la_LDFLAGS += -msse4.1
+endif
+
 gallium_dri_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(top_builddir)/src/mesa/drivers/dri/common/libdricommon.la \
diff --git a/src/gallium/targets/egl-static/Makefile.am
b/src/gallium/targets/egl-static/Makefile.am
index 84f3338..89d948f 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -157,6 +157,10 @@ endif
 egl_gallium_la_LDFLAGS = $(AM_LDFLAGS)
 egl_gallium_la_CPPFLAGS = $(AM_CPPFLAGS)

+if SSE41_SUPPORTED
+egl_gallium_la_LDFLAGS += -msse4.1
+endif
+
 if HAVE_GALLIUM_I915
 egl_gallium_la_CPPFLAGS += -DGALLIUM_I915
 egl_gallium_la_LIBADD += \
diff --git a/src/gallium/targets/osmesa/Makefile.am
b/src/gallium/targets/osmesa/Makefile.am
index 3a554a9..f0bd7fb 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -57,6 +57,10 @@ if HAVE_SHARED_GLAPI
 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
 endif

+if SSE41_SUPPORTED
+lib@OSMESA_LIB@_la_LDFLAGS += -msse4.1
+endif
+
 lib@OSMESA_LIB@_la_LIBADD = \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(top_builddir)/src/gallium/auxiliary/libgallium.la \
diff --git a/src/mesa/Makefile.am b/src/mesa/Makefile.am
index e71bccb..fbd133b 100644
--- a/src/mesa/Makefile.am
+++ b/src/mesa/Makefile.am
@@ -153,6 +153,7 @@ libmesagallium_la_LIBADD = \
 libmesa_sse41_la_SOURCES = \
        main/streaming-load-memcpy.c
 libmesa_sse41_la_CFLAGS = $(AM_CFLAGS) -msse4.1
+libmesa_sse41_la_LDFLAGS = $(AM_LDFLAGS) -msse4.1

 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = gl.pc</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>