DJGPP & Windows command line

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.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

DJGPP & Windows command line

Post 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?
Last edited by inflater on Sat Jan 05, 2008 7:44 am, edited 1 time in total.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post by ucosty »

cygwin + cross compiler

had to say it
The cake is a lie | rackbits.com
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post by inflater »

:( Anything like "compile parameters script" doesn't exist? :(
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

Have you tried MinGW?
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post 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
The cake is a lie | rackbits.com
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post 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.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post 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.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

id love those binaries, i tried (and failed to get an ELF cross compiler working).

could you attach them?

regards, lukem95
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Experience has taught us that if you can't build a cross compiler then you can't follow instructions to the letter.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post 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.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
djnorthyy
Member
Member
Posts: 49
Joined: Mon Apr 09, 2007 10:50 am
Location: UK, Hants
Contact:

Post by djnorthyy »

Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '
User avatar
astrocrep
Member
Member
Posts: 127
Joined: Sat Apr 21, 2007 7:21 pm

Post 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
Mouse Pad - Coming in the distant future...
Kernel: Indigo Kernel - v0.0.1

Thanks to JamesM and BrokenThorn for there tutorials!
User avatar
t0xic
Member
Member
Posts: 216
Joined: Sat May 05, 2007 3:16 pm
Location: VA
Contact:

Post 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
User avatar
Solar
Member
Member
Posts: 7637
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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...
Every good solution is obvious once you've found it.
Post Reply