Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 34972 - optimizing gcc with profiledbootstrap
Summary: optimizing gcc with profiledbootstrap
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-03 07:16 UTC by Peter Simons
Modified: 2004-07-14 10:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Simons 2003-12-03 07:16:12 UTC
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:
Comment 1 Alexander Gabert (RETIRED) gentoo-dev 2004-03-04 05:54:10 UTC
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
Comment 2 Alexander Gabert (RETIRED) gentoo-dev 2004-03-11 00:41:51 UTC
would USE="profiling" be good for you?

thanks,

Alex
Comment 3 Peter Simons 2004-04-05 09:02:25 UTC
"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?
Comment 4 Travis Tilley (RETIRED) gentoo-dev 2004-04-20 09:18:55 UTC
......dont we already do this by default? *checks*
Comment 5 Travis Tilley (RETIRED) gentoo-dev 2004-04-20 09:22:58 UTC
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?
Comment 6 Travis Tilley (RETIRED) gentoo-dev 2004-07-14 10:02:10 UTC
gcc 3.4 now uses a profiled bootstrap