Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dramatically different emerge times for gcc
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Sep 30, 2012 6:33 pm    Post subject: dramatically different emerge times for gcc Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Oct 01, 2012 1:50 am    Post subject: Reply with quote

The cross-compilers can't do the three stage bootstrap normal GCC does, for obvious reasons.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Mon Oct 01, 2012 2:18 am    Post subject: Reply with quote

Ant P. wrote:
The cross-compilers can't do the three stage bootstrap normal GCC does, for obvious reasons.
And glibc?
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Mon Oct 01, 2012 9:58 am    Post subject: Re: dramatically different emerge times for gcc Reply with quote

devsk wrote:
I have an x86 system
...
where sys-devel/gcc builds in 13mins
Using ccache ?
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Mon Oct 01, 2012 2:29 pm    Post subject: Re: dramatically different emerge times for gcc Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Mon Oct 01, 2012 4:35 pm    Post subject: Re: dramatically different emerge times for gcc Reply with quote

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
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Mon Oct 01, 2012 4:57 pm    Post subject: Re: dramatically different emerge times for gcc Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum