Page 2 of 2
Posted: Tue Aug 14, 2007 3:27 pm
by Meshounah
Candy wrote:http://www.osdev.org/wiki/GCC_Cross-Compiler of course.
Make a cross compiler and it will not pretend you're making a program for Windows.
ok i'll check it out
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Posted: Tue Aug 14, 2007 3:34 pm
by Meshounah
are you sure that what i need since none of the beginner tutorials mention it?
Posted: Tue Aug 14, 2007 3:43 pm
by Combuster
There used to be a label saying something like "You are expected to use a cross-compiler" on the wiki. there used to be an FAQ entry telling you to build one once you get references to alloca.
Sadly, the only remaining reference I could find on short notice is on the crosscompiler page itself
![Sad :(](./images/smilies/icon_sad.gif)
Posted: Tue Aug 14, 2007 3:45 pm
by Meshounah
funny that bona fide os dev tutorial works in linux but not in cygwin
![Laughing :lol:](./images/smilies/icon_lol.gif)
Posted: Tue Aug 14, 2007 10:57 pm
by Candy
Meshounah wrote:funny that bona fide os dev tutorial works in linux but not in cygwin
![Laughing :lol:](./images/smilies/icon_lol.gif)
A crosscompiler is your best bet. It is compiled for your OS and if you like you can even add your own target to gcc/binutils and have it compile for your OS by default.
Linux tends to be a lot less encumbered with compatibility and legacy stuff than Windows; yet I've run into a few small issues with it that I don't have now with a normal crosscompiler. In most cases you should be fine though.
Cygwin is a small bit different but has a fair chance of working. I think it does add underscores, so it's got at least a few things you need to hack around.
MingW has a lot of different bits, not the least of which is the amount of Windows integration. Don't use it for OS dev (as in, don't even try to).
DJGPP should have died a long time ago. It doesn't even produce code that any normal OS should hope to work in and has too many hacks.
Posted: Wed Aug 15, 2007 10:58 am
by Meshounah
ok i have a question though what does a cross compiler do that normal gcc can't(basically can't i just give gcc arguments a produce raw binary?
Posted: Wed Aug 15, 2007 11:06 am
by frank
Most of the ports of GCC for windows(Cygwin, MingW) don't support compiling to binary or ELF. The only way to compile to binary would be to use a cross compiler.
Posted: Wed Aug 15, 2007 11:07 am
by Meshounah
ok thank you
Posted: Wed Aug 15, 2007 11:27 am
by Meshounah
ok second try to get a compiler going(needed flex) hopefully this work
didnt work it seemed to make all file but make install failed
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
Posted: Thu Aug 16, 2007 2:40 pm
by Candy
Meshounah wrote:ok second try to get a compiler going(needed flex) hopefully this work
didnt work it seemed to make all file but make install failed
![Crying or Very sad :cry:](./images/smilies/icon_cry.gif)
Are you running make install as root, or have you changed the prefix to point to a directory you can write? What is the error it fails on?
Posted: Fri Aug 17, 2007 2:22 am
by JamesM
You needed flex? What version of gcc are you compiling? flex/bison requirements were removed as of 4.x.x IIRC...?
JamesM