The GCC build manual says: "It is possible to use profile feedback to optimize the compiler itself. This should result in a faster compiler binary. Experiments done on x86 using gcc 3.3 showed approximately 7 percent speedup on compiling C programs. To bootstrap compiler with profile feedback, use make profiledbootstrap." Could you guys add support for this in the ebuild? Maybe triggered with a USE flag or something? Reproducible: Always Steps to Reproduce:
the USE="debug" is for emitting patches that support the creation of profiling and debugging information like bounds checkers used by the compiler when generating executables and libraries. but this patch is about making the compiler itself faster. i think it belongs to the set of "performance improvement" USE flags... but there is no such flag with the name "performance" itself... is there maybe a FEATURES="XXX" that we could use as the trigger? thanks, Alex
would USE="profiling" be good for you? thanks, Alex
"USE=profiling" would be fine, although I think the name of the flag is somewhat misleading, because it suggests, that it would build a version of the software with profiling support built-in. Which is not what it does. Perhaps "USE=profoptimizer" or so would be better?
......dont we already do this by default? *checks*
apparently only i did, with the gcc 3.4 pre-release ebuild: if [ -n "`use static`" -a "${gcc_lang}" = "c" ] then # Fix for our libtool-portage.patch S="${WORKDIR}/build" \ emake LDFLAGS="-static" bootstrap \ LIBPATH="${LIBPATH}" \ BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die # Above FLAGS optimize and speedup build, thanks # to Jeff Garzik <jgarzik@mandrakesoft.com> else # Fix for our libtool-portage.patch S="${WORKDIR}/build" \ emake profiledbootstrap \ LIBPATH="${LIBPATH}" \ BOOT_CFLAGS="${CFLAGS}" STAGE1_CFLAGS="-O" || die fi oops. i'm guessing i should USE-enable this in future ebuilds once a USE flag is agreed upon?
gcc 3.4 now uses a profiled bootstrap