[Mesa-dev] [Bug 83669] New: fix build with gcc link time optimizer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Sep 9 06:29:25 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=83669

          Priority: medium
            Bug ID: 83669
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: fix build with gcc link time optimizer
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: marvin24 at gmx.de
          Hardware: All
            Status: NEW
           Version: git
         Component: Mesa core
           Product: Mesa

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140909/dbd18dc1/attachment.html>


More information about the mesa-dev mailing list