public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Thomas T. Veldhouse" <veldy@veldy.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] gcc-4.1.1
Date: Fri, 16 Jun 2006 12:25:25 -0500	[thread overview]
Message-ID: <4492E985.60400@veldy.net> (raw)
In-Reply-To: <FAEEIJPAOFEMBBLKPMJECEGMGCAA.BYoung@NuCORETech.com>

Bob Young wrote:
>   
>> -----Original Message-----
>> From: richard.j.fish@gmail.com [mailto:richard.j.fish@gmail.com]On
>> Behalf Of Richard Fish
>> Sent: Wednesday, June 07, 2006 9:24 PM
>> To: gentoo-user@lists.gentoo.org
>> Subject: Re: [gentoo-user] gcc-4.1.1
>>
>>
>> On 6/7/06, Bob Young <BYoung@nucoretech.com> wrote:
>>     
>>> chain. At the end of the first emerge -e system you may have a
>>>       
>> new compiler,
>>     
>>> but that new compiler was built with the old compiler.
>>>       
>> This is false.  Gcc uses itself to build itself.  It uses the system
>> compiler to build an initial version of itself, and then uses that
>> version to build itself.  And then for good measure, it uses that
>> version to build the final version.  It's called a 3-stage bootstrap,
>> and is documented in the file INSTALL/build.html in the gcc sources.
>> You can also look at /usr/portage/eclass/toolchain.eclass to determine
>> that Gentoo uses the "bootstrap-lean" target by default.
>>     
>
> No, sorry that's just wrong. gcc is slotted, if the above were true there
> would be no need for gcc-config in order to select a default compiler. When
> a new compiler is emerged, it does *not* automatically become the default
> system compiler, it must be selected, and that can only happen after it has
> successfully been emerged. The first time a new gcc compiler is emerged, it
> is indeed built with the previous version of the compiler that is currently
> istalled as the system default.
>   
xgcc is built with the previous system compiler.  Then xgcc is used to 
build the new gcc for installation.  The final install is a self-built 
gcc and is not built by the previous system compiler.
>
>   
>> Frankly, anybody who claims that gcc needs to be merged twice so it
>> can be built with itself and produce better object code does not have
>> a clue what they are talking about and you should simply disregard
>> anything else they have to say about what is necessary/useful when
>> upgrading gcc.
>>     
>
> It does have to be emerged twice in order for it to be built with itself,
> anybody who thinks otherwise doesn't understand the basic principles of
> compiling and linking.
>   
I think you have ignored what the previous poster suggested.
>   
>>> happen before glibc is rebuilt are linked against a glibc that was built
>>> with the old compiler.
>>>       
>> And guess what difference this makes to the end result.  None.
>> Nada.  Nothing.
>>
>> Because for basically every program on your system, they are
>> *dynamically linked* against glibc.
>>     
>
> Are you absolutely 100% sure that every single system utility and
> application is *dynamically* linked, and that no apps or utilities anywhere
> in the system specifies *static* linking?
>
>   
>> There are a few statically linked programs that will include glibc
>> internally.  These are used only for system recovery purposes...there
>> is no need to worry about them at all.
>>     
>
> Really, so people who intentionally and specifically want to upgrade
> absolutely *everything* should not worry about what gets left out because
> Richard says it's unimportant?
>
> The issue is about upgrading gcc and even the gcc upgrade howto recommends
> an emerge -e world. It's clear that gcc it self at least has to be emerged
> twice in order to build the new gcc *with* the new gcc. 
Wrong.  The gcc package builds a bootstrap compiler (the new version), 
called xgcc and then it uses that to build [after some tests] the final 
installed gcc.  A single emerge of gcc will create a compiler that was 
built by itself.

Thus, if you move from 3.3.4 to 4.1.0:

emerge -u gcc

You WILL have a gcc that was compiled by a 4.1.0 compiler.

> Whether this is
> strictly necessary or not is certaintly debatable, but since it executes
> fairly quickly, and seems a prudent step, I'd argue that it's a reasonable
> course. Of course a selecting the new gcc as the default with gcc-config is
> also required in between, but that's self evident. Adding gcc-config, glibc,
> binutils, libstdc++-v3, quickly covers the most important parts of the basic
> tool chain, and covers most utilities or apps that might specify static
> linking, and executes much much faster than an emerge -e system.
>
>   
>> There is no value to having glibc or libstdc++-v3 in the first line.
>> There is no value at all to doing that twice.
>>     
>
> Twice is the only way to build the new gcc *with* the new gcc. I should have
> added the gcc-config select command in between, but I thought that was
> pretty clearly necessary.
>
>   
You didn't pay attention to what he wrote.  I hope perhaps my post made 
it more clear.

Tom Veldhouse


-- 
gentoo-user@gentoo.org mailing list



  parent reply	other threads:[~2006-06-16 17:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ad4496950606070647s5a4bc702m8deeda7dbd590c4a@mail.gmail.com>
2006-06-07 13:53 ` [gentoo-user] gcc-4.1.1 Mohammed Hagag
2006-06-07 14:30   ` Peper
2006-06-07 14:35     ` Julien Cabillot
2006-06-07 14:45   ` Kristian Poul Herkild
2006-06-07 14:56   ` Neil Bothwick
2006-06-07 15:00   ` Bo Ørsted Andresen
2006-06-07 15:25   ` Conneries wearegeeks
2006-06-07 16:04   ` Roy Wright
2006-06-07 17:46     ` Mike Huber
2006-06-07 18:09       ` Daniel da Veiga
2006-06-07 19:27         ` Roy Wright
2006-06-07 19:55           ` Daniel da Veiga
2006-06-07 18:17       ` Evan Klitzke
2006-06-07 23:25     ` Richard Fish
2006-06-08  0:32       ` Evan Klitzke
2006-06-08  4:40         ` Richard Fish
2006-06-08 11:39           ` Mohammed Hagag
2006-06-08  1:50       ` Bob Young
2006-06-08  2:10         ` Jerry McBride
2006-06-12 21:35           ` Bob Young
2006-06-13  0:09             ` Richard Fish
2006-06-08  4:24         ` Richard Fish
2006-06-08 12:34           ` Bob Young
2006-06-08 13:31             ` Hans-Werner Hilse
2006-06-08 14:00               ` Bob Young
2006-06-08 14:28                 ` Bo Ørsted Andresen
2006-06-08 14:57                   ` Bob Young
2006-06-08 15:27                 ` Toby Cubitt
2006-06-08 18:05             ` Richard Fish
2006-06-09 11:50               ` Vladimir G. Ivanovic
2006-06-09 19:43                 ` Richard Fish
2006-06-16 17:25             ` Thomas T. Veldhouse [this message]
2006-06-16 17:50               ` Bob Young
2006-06-16 17:17         ` Thomas T. Veldhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4492E985.60400@veldy.net \
    --to=veldy@veldy.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox