http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58592
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- try removing -fwhole-program and add -fuse-linker-plugin Note that it's unlikely we that somebody works on this for 4.7, which means you may want to try GCC 4.8.1 or later.