<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - webkit-2.4.9 will not compile with lto"
   href="https://bugs.webkit.org/show_bug.cgi?id=154281">154281</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>webkit-2.4.9 will not compile with lto
          </td>
        </tr>

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

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Local Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>JavaScriptCore
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>john.frankish&#64;outlook.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using gcc-5.2.0, webkit-2.4.9 fails to compile with lto, but compiles OK without lto.

webkit-2.8.5 will compile with lto.

CC=&quot;gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe&quot; CXX=&quot;g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe&quot; ../configure --prefix=/usr/local --disable-static --libexecdir=/usr/local/lib/webkit2gtk-3.0 --enable-introspection

find . -name GNUmakefile -type f -exec sed -i 's/-O2//g' {} \;

time make -j5
...
libtool: link: g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe  -fPIC -DPIC -shared -nostdlib /usr/lib/crti.o /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.2.0/crtbeginS.o .libs/libjavascriptcoregtk-3.0.la.lnkscript -Wl,--whole-archive ./.libs/libWTF.a -Wl,--no-whole-archive  -L/usr/local/lib -ldl -L/usr/lib -lresolv /usr/local/lib/libffi.so /usr/local/lib/libpcre.so -lpthread -lz /usr/local/lib/libgmodule-2.0.so /usr/local/lib/libgthread-2.0.so /usr/local/lib/libgio-2.0.so /usr/local/lib/libgobject-2.0.so /usr/local/lib/libglib-2.0.so -licui18n -licuuc -licudata -lrt -L/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.2.0 -L/tmp/tcloop/gcc/usr/local/bin/../lib/gcc -L/tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../.. /usr/lib/libstdc++.so -lm -lc -lgcc_s /tmp/tcloop/gcc/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/5.2.0/crtendS.o /usr/lib/crtn.o  -flto -fuse-linker-plugin -mtune=generic -Os -pthread -pt
...
[there are at least 200 blank lines in the terminal window at this point]

`llint_entry_osr' referenced in section `.text' of /tmp/ccwDMpRR.ltrans0.ltrans.o: defined in discarded section `.text' of Source/JavaScriptCore/llint/.libs/libjavascriptcoregtk_3_0_la-LLIntSlowPaths.o (symbol from plugin)
...
`llint_throw_from_native_call' referenced in section `.text' of /tmp/ccwDMpRR.ltrans0.ltrans.o: defined in discarded section `.text' of Source/JavaScriptCore/llint/.libs/libjavascriptcoregtk_3_0_la-LLIntSlowPaths.o (symbol from plugin)
collect2: error: ld returned 1 exit status
GNUmakefile:38166: recipe for target 'libjavascriptcoregtk-3.0.la' failed
make[1]: *** [libjavascriptcoregtk-3.0.la] Error 1
make[1]: Leaving directory '/usr/src/webkitgtk-2.4.9/build'
GNUmakefile:25825: recipe for target 'all' failed
make: *** [all] Error 2
Command exited with non-zero status 2
real    1h 12m 52s
user    4h 17m 47s
sys     24m 21.01s</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>