This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH RFA: Build system: Check for -static-libstdc++

"H.J. Lu" <> writes:

> On Wed, Nov 3, 2010 at 10:35 AM, Ian Lance Taylor <> wrote:
>> This is different from the usual case of moving the compiler around.
>> The issue here is that the Go compiler itself is linked against
>> ÂMoreover, in the normal case of a doing a bootstrap, the
>> Go compiler will be linked against the of the newly built
>> gcc. ÂThat means that when somebody bootstraps a new version of gcc,
>> they will normally get a Go compiler which does not run with the
>> installed; it will require the which was just
>> created. ÂThe only way to make that work reliably is to use a
>> -Wl,--rpath option when linking the Go compiler to point to the
>> installed location of ÂAnd that will fail if the compiler
>> is moved to a new location or to a new machine.
>> I believe that the least confusing option is to link the Go compiler
>> with -static-libstdc++. ÂJust as I believe that when and if we convert
>> gcc itself to compile with C++, we should link gcc itself with
>> -static-libstdc++.
> How can you avoid:
> [hjl@gnu-6 gcc]$ ldd cc1
> =>  (0x00007ffff7ffe000)
> => /usr/lib64/ (0x0000003f22a00000)
> => /usr/lib64/ (0x0000003f22400000)
> => /usr/lib64/ (0x0000003f22000000)
> => /usr/lib64/ (0x0000003f21c00000)
> => /usr/lib64/ (0x00007ffff7dcd000)
> => /usr/lib64/ (0x00007ffff7b7e000)
> => /usr/lib64/ (0x0000003f2b400000)
> => /lib64/ (0x00007ffff797a000)
> => /lib64/ (0x00007ffff7764000)
> => /lib64/ (0x0000003f21400000)
> => /usr/lib64/ (0x0000003f2d000000)
> => /lib64/ (0x0000003f21800000)
> => /lib64/ (0x0000003f2bc00000)
> 	/lib64/ (0x0000003f21000000)
> [hjl@gnu-6 gcc]$
> Please note:
> 1. GCC is still in C.
> 2. dependency comes from other DSOes.

That case is different.  The there is not the one from the
bootstrapped compiler.  It is the system one, brought in from the
dependencies of the other shared libraries.  This causes no unusual

The difficulty comes when gcc itself is linked against the newly built
bootstrapped, a which in the general case is
newer than the system


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]