<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><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">83669</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fix build with gcc link time optimizer
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>marvin24@gmx.de
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Mesa core
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is more like a wish. Using gcc 4.9 (4.9.1) and gold linker:

        CFLAGS="-march=native -flto" \
        CXXFLAGS="-march=native -flto" \
        LDFLAGS="-march=native -flto" \
        LD="ld.gold"

mesa fails to compile. First hit is the glsl_compiler

/bin/sh ../../libtool  --tag=CXX   --mode=link g++ -fvisibility=hidden
-march=native -flto -Wall -fno-strict-aliasing -fno-builtin-memcmp  
-march=native -flto -o glsl_compiler imports.o prog_hash_table.o symbol_table.o
standalone_scaffolding.o main.o libglsl.la -lpthread 
libtool: link: g++ -fvisibility=hidden -march=native -flto -Wall
-fno-strict-aliasing -fno-builtin-memcmp -march=native -flto -o glsl_compiler
imports.o prog_hash_table.o symbol_table.o standalone_scaffolding.o main.o 
./.libs/libglsl.a -lpthread
/tmp/ccOBu41q.ltrans0.ltrans.o: In function `_mesa_new_shader':
ccOBu41q.ltrans0.o:(.text+0x15d7): undefined reference to `rzalloc_size'
/tmp/ccOBu41q.ltrans0.ltrans.o: In function `_mesa_glsl_parse_state::operator
new(unsigned long, void*)':
ccOBu41q.ltrans0.o:(.text+0x19a1): undefined reference to `ralloc_size'
/tmp/ccOBu41q.ltrans0.ltrans.o: In function `load_text_file(void*, char
const*)':
ccOBu41q.ltrans0.o:(.text+0x2208): undefined reference to `ralloc_size'
/tmp/ccOBu41q.ltrans0.ltrans.o: In function `compile_shader(gl_context*,
gl_shader*)':
ccOBu41q.ltrans0.o:(.text+0x2349): undefined reference to
`_mesa_glsl_parse_state::_mesa_glsl_parse_state(gl_context*, gl_shader_stage,
void*)'
ccOBu41q.ltrans0.o:(.text+0x2379): undefined reference to
`_mesa_glsl_compile_shader'
ccOBu41q.ltrans0.o:(.text+0x23b6): undefined reference to `_mesa_print_ir'
/tmp/ccOBu41q.ltrans0.ltrans.o: In function `main':
ccOBu41q.ltrans0.o:(.text+0x2532): undefined reference to `rzalloc_size'
ccOBu41q.ltrans0.o:(.text+0x2547): undefined reference to `ralloc_strdup'
ccOBu41q.ltrans0.o:(.text+0x257f): undefined reference to `reralloc_array_size'
ccOBu41q.ltrans0.o:(.text+0x259b): undefined reference to `rzalloc_size'
ccOBu41q.ltrans0.o:(.text+0x2846): undefined reference to
`link_shaders(gl_context*, gl_shader_program*)'
ccOBu41q.ltrans0.o:(.text+0x28ac): undefined reference to `ralloc_free'
ccOBu41q.ltrans0.o:(.text+0x28c1): undefined reference to `ralloc_free'
ccOBu41q.ltrans0.o:(.text+0x28c6): undefined reference to
`_mesa_glsl_release_types'
ccOBu41q.ltrans0.o:(.text+0x28cb): undefined reference to
`_mesa_glsl_release_builtin_functions()'
collect2: error: ld returned 1 exit status
gmake[3]: *** [glsl_compiler] Fehler 1

# gcc --version
gcc (SUSE Linux) 4.9.1

# ld.gold --version
GNU gold (GNU Binutils; devel:gcc / openSUSE_13.1 2.24.0.20140403-196) 1.11</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>