Need help setting up cross-compilers

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gungan37
Posts: 2
Joined: Thu Dec 13, 2012 5:02 pm

Need help setting up cross-compilers

Post by gungan37 »

Hello guys! I have recently moved from COSMOS (a tool for making OS's in C# .NET with bits of x86 ASM sprinkled in) to C and assembly since I could not get interrupts and good memory management working in COSMOS.

I am very good with C# and Windows programming, but not so much with Linux. I have had trouble with Cygwin so I figured Linux would be the best way to go for something like OS dev. However, I have been having some trouble getting the i586 gcc compiler working.

I am using Ubuntu 10.04 (old, I know) and all the repositories I have tried for a pre-compiled GCC for the i586 target are no longer online. I have not used GCC and the bash terminal in a while, so could someone please help me get the i586-elf-gcc package? Thanks!
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Need help setting up cross-compilers

Post by AJ »

Hi,

It should all work fine in Cygwin. I'd recommend that if you are familiar with windows, you stick to thy for development (unless you are specifically doing this to learn Linux). Why perform a difficult programming project with tools you are not comfortable with? Having said that, the instructions should work equally well on Cygwin or Linux (if not, the tutorial is broken).

What's the specific problem with building the cross compiler?

Cheers,
Adam
gungan37
Posts: 2
Joined: Thu Dec 13, 2012 5:02 pm

Re: Need help setting up cross-compilers

Post by gungan37 »

Thanks for the reply! My problem was that I was trying to use the OSDev repositories to get the Debian package: but all the repositories are down.

I will take your advice and stick with Cygwin and give a shot at building the compiler myself. I will post back when I am done (or hopelessly lost :D )
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Need help setting up cross-compilers

Post by xenos »

There is a quite helpful article on building a GCC Cross-Compiler which should work both on Cygwin and Linux. Most people here are building their osdev toolchains this way, so it is also recommended as a standard environment. It also has the advantage that you probably get some more recent gcc / binutils version than from some outdated Linux repository.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Post Reply