This is the mail archive of the gcc@gcc.gnu.org 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: compiling gcc 2.95.3 under ubuntu 10.04.2, x86_64


Hi Richard,
Could you please provide some more instructions on how you got your 2.95 build using GCC 3?

I just tried using GCC 3.4.6 (from http://packages.ubuntu.com/hardy/amd64/gcc-3.4-base/download) and build from source using this command:
CC=../gcc-3.4/bin/gcc-3.4 CFLAGS=-D_FORTIFY_SOURCE=0 ./configure --prefix=~/gcc-2.95.3 --enable-languages=c,c++ --enable-threads=posix --enable-shared --host i386-pc-linux-gnu
It dies right away because it can't find cc1. I got the cc1 executable from the corresponding cpp 3.4.6 package (http://packages.ubuntu.com/hardy/amd64/cpp-3.4/download) and placed it in the same bin directory as the gcc-3.4 executable, but still nothing.
As you can probably guess I've never build GCC from source before.. but I can right away spot that the target host is i386 - I'm assuming that's due to the fact that GCC 2.95 doesn't even support x86_64?

Regards,
Roman.

On 03-Apr-2012, at 6:30 , Richard Guenther wrote:

> On Tue, Apr 3, 2012 at 12:21 PM, Andrew Haley <aph@redhat.com> wrote:
>> On 04/02/2012 06:29 PM, Roman Suvorov wrote:
>>> Hello everyone,
>>> Not sure if this is the right place to ask this question, feel free to point me in the right direction.
>> 
>> Redirect to gcc-help.
>> 
>>> I'm looking into the evolution of Linux kernel and this requires me
>>> to build some ancient releases (as old as 2.4.0) from source using
>>> GCC. I have gcc 4.4.3-4ubuntu5 installed on my lab machine but it's
>>> incompatible with these old sources, and the "lowest common
>>> denominator" would be gcc 2.95.3, so I've been trying to compile it
>>> from source - so far with little success.
>> 
>>> It's hard but not impossible - done before by this guy:
>>> http://www.trevorpounds.com/blog/?p=111&cpage=1#comment-102. I
>>> followed all of his suggestions but so far hasn't had much luck -
>>> most recent attempt dies with the following message:
>> 
>>> /usr/bin/ld.bfd.real: error in pic/cstrmain.o(.eh_frame); no .eh_frame_hdr table will be created.
>>> 
>>> The URL above contains a link to my stdout/stderr logs too. Has anyone here tried compiling such an old version of GCC? Any advice/help would be greatly appreciated.
>> 
>> It's going to be hard.  gcc 2.95 doesn't support using x86_64 as a host,
>> so you're going to have to build in in a 32-bit virtual machine or by
>> using mock.
>> 
>> You'll have other problems too.  gcc back then wasn't so standards-
>> clean as it is now; we have a lot of warnings and better diagnostics
>> that have allowed us to clean up gcc.  I don't know why you got that
>> particular message, and as I said I can't look at your logs.  I might
>> have a try myself to build gcc 2.95 later today.
> 
> You can have success with only minor patching when you stage a 3.x
> release inbetween and use that to compile 2.95.  At least that is how
> I created my 2.95 build ;)
> 
> Richard.
> 
>> Andrew.


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