View previous topic :: View next topic |
Author |
Message |
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Sun Sep 30, 2012 6:33 pm Post subject: dramatically different emerge times for gcc |
|
|
I have an x86 system where I have installed crossdev and what I find is that the cross-x86_64-pc-linux-gnu/gcc builds in 2.5mins whereas sys-devel/gcc builds in 13mins. Both are built with same USE flags and same version (4.7.2). Same holds true for binutils and glibc as well.
Is there an obvious reason for this large difference? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Oct 01, 2012 1:50 am Post subject: |
|
|
The cross-compilers can't do the three stage bootstrap normal GCC does, for obvious reasons. |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Oct 01, 2012 2:18 am Post subject: |
|
|
Ant P. wrote: | The cross-compilers can't do the three stage bootstrap normal GCC does, for obvious reasons. | And glibc? |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Mon Oct 01, 2012 9:58 am Post subject: Re: dramatically different emerge times for gcc |
|
|
devsk wrote: | I have an x86 system
...
where sys-devel/gcc builds in 13mins | Using ccache ? |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Oct 01, 2012 2:29 pm Post subject: Re: dramatically different emerge times for gcc |
|
|
toralf wrote: | devsk wrote: | I have an x86 system
...
where sys-devel/gcc builds in 13mins | Using ccache ? | yes. why would ccache slow down the build of gcc (or glibc for that matter)? |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3922 Location: Hamburg
|
Posted: Mon Oct 01, 2012 4:35 pm Post subject: Re: dramatically different emerge times for gcc |
|
|
devsk wrote: | why would ccache slow down the build of gcc (or glibc for that matter)? | From the compilation times you gave it seems that you have many fast CPUs - ccache needs access to the (much more slower) disks (at least at the first run with low RAM).
To compare times, you should emerge the same package with and without ccache and/or twice in a row (with enough RAM ccache would benefit of the disk caching of linux). |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Mon Oct 01, 2012 4:57 pm Post subject: Re: dramatically different emerge times for gcc |
|
|
toralf wrote: | devsk wrote: | why would ccache slow down the build of gcc (or glibc for that matter)? | From the compilation times you gave it seems that you have many fast CPUs - ccache needs access to the (much more slower) disks (at least at the first run with low RAM).
To compare times, you should emerge the same package with and without ccache and/or twice in a row (with enough RAM ccache would benefit of the disk caching of linux). | Without ccache, gcc emerged in 15mins. So, 2mins worse than with ccache, which is expected because there is a stage where it uses the existing compiler to build parts and they can safely come from ccache.
So, the question still remains: why would cross-compiled glibc/binutils compile in half the time compared to native? I think I am ready to buy multiple stages of gcc as an explanation for gcc's increased build time but glibc/binutils? Something is fishy about this. |
|
Back to top |
|
|
|