Page 1 of 2

DJGPP & Windows command line

Posted: Sat Jan 05, 2008 7:42 am
by inflater
Hi,
When compiling my kernel in C, I ran on one nasty problem: If the whole command line (path to GCC, GCC.EXE + all parameters) are larger than 128 characters, system refuses to execute the C compiler. Adding the parameters to a environment variable (SET gccoptions=blahblah) didn't help.

Any hints?

Posted: Sat Jan 05, 2008 7:43 am
by ucosty
cygwin + cross compiler

had to say it

Posted: Sat Jan 05, 2008 7:46 am
by inflater
:( Anything like "compile parameters script" doesn't exist? :(

Posted: Sat Jan 05, 2008 7:52 am
by djnorthyy
Have you tried MinGW?

Posted: Sat Jan 05, 2008 8:20 am
by Combuster
DJGPP and DOS are dated. There is no need to keep kicking a dead horse.

I agree with ucosty. Cygwin + a GCC Cross-Compiler is the way to go.

Posted: Sat Jan 05, 2008 8:21 am
by ucosty
inflater wrote::( Anything like "compile parameters script" doesn't exist? :(
Not really. Because DJGPP is a DOS app, it is subject to all of those limitations. Reason enough to not use it, really.

MinGW is limited to making PE files, if I remember correctly.

edit: beaten to it

Posted: Sat Jan 05, 2008 11:18 am
by t0xic
Inflater,

I used to use DJGPP until I switched over to cygwin, and I like cygwin much better. If you want, I can give you the pre-compiled binaries for the cross-compiler for the i586-elf/i386-elf if you want them.

Posted: Sat Jan 05, 2008 11:33 am
by inflater
I "fixed" it by moving the whole kernel to c:\krn, but that isn't a fix. Can that cross compiler's linker target to binary? If yes... i would be very grateful for it. :P But I'll try to find it myself first.

Posted: Sat Jan 05, 2008 1:14 pm
by lukem95
id love those binaries, i tried (and failed to get an ELF cross compiler working).

could you attach them?

regards, lukem95

Posted: Sat Jan 05, 2008 1:18 pm
by Combuster
Experience has taught us that if you can't build a cross compiler then you can't follow instructions to the letter.

Posted: Sat Jan 05, 2008 1:39 pm
by lukem95
well, i got the cross compiler sort of working, but i couldnt get it to link a single elf properly, and i found DJGPP easier.

i keep meaning to migrate, but i jumped on this chance, as it would give me a sure fire way of getting it to work.

Posted: Sat Jan 05, 2008 4:11 pm
by djnorthyy

Posted: Sat Jan 05, 2008 4:42 pm
by astrocrep
Honestly... building a cygwin cross compiler... is all hype... its really really easy and the benefits out weight the time spent 10000 to 1.

-Rich

Posted: Sat Jan 05, 2008 4:47 pm
by t0xic
For all of you who want a i586-elf cross compiler/binutils set:
Heres a link to the copy on my googlecode page: http://onyxkernel.googlecode.com/files/toolset.tar.bz2

--Michael

Posted: Mon Jan 07, 2008 12:37 am
by Solar
I much prefer talking anyone having a problem with the GCC Cross-Compiler tutorial through, instead of providing ready- built binaries. The source for such binaries might go away, leaving the person in question with no way to update his toolchain. Moreover, it gives the impression that there might be anything difficult involved, making newcomers avoid the tutorial when there's no need...