Page 1 of 1

Need help setting up cross-compilers

Posted: Thu Dec 13, 2012 5:10 pm
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!

Re: Need help setting up cross-compilers

Posted: Thu Dec 13, 2012 8:33 pm
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

Re: Need help setting up cross-compilers

Posted: Thu Dec 13, 2012 9:07 pm
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 )

Re: Need help setting up cross-compilers

Posted: Thu Dec 13, 2012 11:55 pm
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.