* compile gcc and library
@ 2012-05-24 17:41 Xin Tong
2012-05-24 17:58 ` Ian Lance Taylor
2012-05-25 8:30 ` Andrew Haley
0 siblings, 2 replies; 7+ messages in thread
From: Xin Tong @ 2012-05-24 17:41 UTC (permalink / raw)
To: gcc-help
I am looking for an older version of gcc ( gcc version 3.4.X). I can
not find it in my os software repository. therefore i decide to
download the source and compile it myself. I am looking at this
download link and have a few questions.
1. does gcc-3.4.2.tar.bz2 include all the other tars (i.e.
gcc-g++-3.4.2.tar.bz2 ).
2. if i compile the gcc in gcc-3.4.2.tar.bz2, is libc going to be
compiled as well ? there are also other libraries such as libstdc++,
is it going to be compiled.
3. is it possible to link again a library compiled by other versions
of gcc (i.e. a program compiled with gcc 3.4.4 and links it with
library that comes with gcc-4.4.6 ) ?
http://gcc.skazkaforyou.com/releases/gcc-3.4.2/
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-24 17:41 compile gcc and library Xin Tong
@ 2012-05-24 17:58 ` Ian Lance Taylor
2012-05-24 18:11 ` Xin Tong
2012-05-25 8:30 ` Andrew Haley
1 sibling, 1 reply; 7+ messages in thread
From: Ian Lance Taylor @ 2012-05-24 17:58 UTC (permalink / raw)
To: Xin Tong; +Cc: gcc-help
Xin Tong <xerox.time.tech@gmail.com> writes:
> I am looking for an older version of gcc ( gcc version 3.4.X). I can
> not find it in my os software repository. therefore i decide to
> download the source and compile it myself. I am looking at this
> download link and have a few questions.
>
> 1. does gcc-3.4.2.tar.bz2 include all the other tars (i.e.
> gcc-g++-3.4.2.tar.bz2 ).
Yes.
> 2. if i compile the gcc in gcc-3.4.2.tar.bz2, is libc going to be
> compiled as well ? there are also other libraries such as libstdc++,
> is it going to be compiled.
GCC includes the C++ library, libstdc++, but it does not include a C
library.
> 3. is it possible to link again a library compiled by other versions
> of gcc (i.e. a program compiled with gcc 3.4.4 and links it with
> library that comes with gcc-4.4.6 ) ?
>
> http://gcc.skazkaforyou.com/releases/gcc-3.4.2/
In general, yes. For pure C code, yes. For C++ code, some caveats may
apply.
Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-24 17:58 ` Ian Lance Taylor
@ 2012-05-24 18:11 ` Xin Tong
2012-05-24 19:17 ` Ian Lance Taylor
0 siblings, 1 reply; 7+ messages in thread
From: Xin Tong @ 2012-05-24 18:11 UTC (permalink / raw)
To: Ian Lance Taylor; +Cc: gcc-help
On Thu, May 24, 2012 at 1:58 PM, Ian Lance Taylor <iant@google.com> wrote:
> Xin Tong <xerox.time.tech@gmail.com> writes:
>
>> I am looking for an older version of gcc ( gcc version 3.4.X). I can
>> not find it in my os software repository. therefore i decide to
>> download the source and compile it myself. I am looking at this
>> download link and have a few questions.
>>
>> 1. does gcc-3.4.2.tar.bz2 include all the other tars (i.e.
>> gcc-g++-3.4.2.tar.bz2 ).
>
> Yes.
>
>> 2. if i compile the gcc in gcc-3.4.2.tar.bz2, is libc going to be
>> compiled as well ? there are also other libraries such as libstdc++,
>> is it going to be compiled.
>
> GCC includes the C++ library, libstdc++, but it does not include a C
> library.
>
>> 3. is it possible to link again a library compiled by other versions
>> of gcc (i.e. a program compiled with gcc 3.4.4 and links it with
>> library that comes with gcc-4.4.6 ) ?
>>
>> http://gcc.skazkaforyou.com/releases/gcc-3.4.2/
>
> In general, yes. For pure C code, yes. For C++ code, some caveats may
> apply.
>
This is the reason why gcc contains a c++ library, but no need for C
library ? what kind of caveats , like different mangling styles ?
> Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-24 18:11 ` Xin Tong
@ 2012-05-24 19:17 ` Ian Lance Taylor
0 siblings, 0 replies; 7+ messages in thread
From: Ian Lance Taylor @ 2012-05-24 19:17 UTC (permalink / raw)
To: Xin Tong; +Cc: gcc-help
Xin Tong <xerox.time.tech@gmail.com> writes:
>> In general, yes. For pure C code, yes. For C++ code, some caveats may
>> apply.
>>
>
> This is the reason why gcc contains a c++ library, but no need for C
> library ?
A C library inherently has lots of system dependencies, like how to do
I/O on the system. It's easier to maintain that separately from the
compiler.
A C++ library does not have those dependencies, because it can simply
use the facilities of the C library. Also, a C++ library has some close
ties to the compiler, e.g., in how exceptions are implemented and
details of things like __is_pod.
Also and probably more importantly, historically GCC was developed on
systems that have C libraries but don't have C++ libraries. So GCC
always needed to provide a C++ library, but rarely needed to provide a C
one.
> what kind of caveats , like different mangling styles ?
That is one, yes. In general the C++ ABI is much more complex and
subtle than the C ABI, and there is a correspondingly higher chance of
some sort of breakage. That said, it usually does work fine.
Ian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-24 17:41 compile gcc and library Xin Tong
2012-05-24 17:58 ` Ian Lance Taylor
@ 2012-05-25 8:30 ` Andrew Haley
2012-05-25 15:23 ` Ángel González
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Haley @ 2012-05-25 8:30 UTC (permalink / raw)
To: gcc-help
On 05/24/2012 06:40 PM, Xin Tong wrote:
> I am looking for an older version of gcc ( gcc version 3.4.X). I can
> not find it in my os software repository. therefore i decide to
> download the source and compile it myself. I am looking at this
> download link and have a few questions.
This is going to be tricky. Older versions of gc generally don't
compile with newer versions, and you'll have to do some fixing
up.
Andrew.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-25 8:30 ` Andrew Haley
@ 2012-05-25 15:23 ` Ángel González
2012-05-25 15:29 ` Andrew Haley
0 siblings, 1 reply; 7+ messages in thread
From: Ángel González @ 2012-05-25 15:23 UTC (permalink / raw)
To: Andrew Haley; +Cc: gcc-help
On 25/05/12 10:30, Andrew Haley wrote:
> On 05/24/2012 06:40 PM, Xin Tong wrote:
>> I am looking for an older version of gcc ( gcc version 3.4.X). I can
>> not find it in my os software repository. therefore i decide to
>> download the source and compile it myself. I am looking at this
>> download link and have a few questions.
> This is going to be tricky. Older versions of gc generally don't
> compile with newer versions, and you'll have to do some fixing
> up.
>
> Andrew.
I thought the minimum compiler requirements for the bootstrap compiler
where very limited.
Isn't it even backwards compatible for one version? (ie. you can use
version X
to build X-1, then X-1 to build X-2...)
As for the actual problem of getting a 3.4 gcc, you may have better luck
making
the binary from some archive like
http://ge.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/
to work.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compile gcc and library
2012-05-25 15:23 ` Ángel González
@ 2012-05-25 15:29 ` Andrew Haley
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Haley @ 2012-05-25 15:29 UTC (permalink / raw)
To: Ángel González; +Cc: gcc-help
On 05/25/2012 04:22 PM, Ãngel González wrote:
> On 25/05/12 10:30, Andrew Haley wrote:
>> On 05/24/2012 06:40 PM, Xin Tong wrote:
>>> I am looking for an older version of gcc ( gcc version 3.4.X). I can
>>> not find it in my os software repository. therefore i decide to
>>> download the source and compile it myself. I am looking at this
>>> download link and have a few questions.
>> This is going to be tricky. Older versions of gc generally don't
>> compile with newer versions, and you'll have to do some fixing
>> up.
> I thought the minimum compiler requirements for the bootstrap compiler
> where very limited.
> Isn't it even backwards compatible for one version? (ie. you can use
> version X
> to build X-1, then X-1 to build X-2...)
Not usually. Very old versions of gcc were often written in semi-broken
nonstandard C.
Andrew.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-05-25 15:29 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-24 17:41 compile gcc and library Xin Tong
2012-05-24 17:58 ` Ian Lance Taylor
2012-05-24 18:11 ` Xin Tong
2012-05-24 19:17 ` Ian Lance Taylor
2012-05-25 8:30 ` Andrew Haley
2012-05-25 15:23 ` Ángel González
2012-05-25 15:29 ` Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).