building a compiler to build cross compiler

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
billcu
Posts: 17
Joined: Tue Aug 26, 2014 9:12 pm

building a compiler to build cross compiler

Post by billcu »

My machine is a little old. And I just had to downgrade to a PCI video card. It really sucks. I am using Fedora 20. OK it has gcc-4. Now I want to build gcc-7.2.0. I guess that means "bootstrapping" the wiki says. What is that? Before I can build a i686-elf 7.2.0 I have to update the compiler.

What are the options I want to use. I don't want to wait all day so I will just compile the C compiler. What options should I use with gcc-4 to build gcc-7.2.0?

Quite a jump. I am trying to follow "Bare Bones".
davidv1992
Member
Member
Posts: 223
Joined: Thu Jul 05, 2007 8:58 am

Re: building a compiler to build cross compiler

Post by davidv1992 »

I would suggest you seriously consider upgrading your linux distribution for starters. The fedora version you are using is 6 versions behind the current, and judging by the fedora website, seems to be out of support for a very significant period of time.

Upgrading will probably give you a newer version of gcc, which should make building newer versions of gcc easier.

Even so, you might need to use in-between versions to get gcc-7 to build using gcc-4. The gcc documentation usually lists the minimum gcc version number, which you can use to check whether, and if so which, intermediate versions you would need to build. Beyond that, building gcc as a normal compiler is relatively straightforward, the usual configure - make - make install sequence should do the trick, but again, the gcc docs are your friend.
billcu
Posts: 17
Joined: Tue Aug 26, 2014 9:12 pm

Re: building a compiler to build cross compiler

Post by billcu »

Those docs are pretty difficult to sift through. I think it says 4.8 and later. What I would like to do is compile with the latest kernel headers. If that is necessary. I think it would be a good idea. That is the newer compiler to build the cross compiler. The cross isn't to be compiled with headers if I am correct in reading "bare bones".
Post Reply