OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 18, 2024 5:17 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: DJGPP & Windows command line
PostPosted: Sat Jan 05, 2008 7:42 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
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?

_________________
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)


Last edited by inflater on Sat Jan 05, 2008 7:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 7:43 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 08, 2006 7:43 am
Posts: 271
Location: Sydney, Australia
cygwin + cross compiler

had to say it

_________________
The cake is a lie | rackbits.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 7:46 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
:( 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)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 7:52 am 
Offline
Member
Member
User avatar

Joined: Mon Apr 09, 2007 10:50 am
Posts: 49
Location: UK, Hants
Have you tried MinGW?

_________________
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 8:20 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
DJGPP and DOS are dated. There is no need to keep kicking a dead horse.

I agree with ucosty. Cygwin + a [wiki]GCC Cross-Compiler[/wiki] 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 ]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 8:21 am 
Offline
Member
Member
User avatar

Joined: Tue Aug 08, 2006 7:43 am
Posts: 271
Location: Sydney, Australia
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 11:18 am 
Offline
Member
Member
User avatar

Joined: Sat May 05, 2007 3:16 pm
Posts: 216
Location: VA
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.

_________________
Kryos Google Page


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 11:33 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
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)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 1:14 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 03, 2007 6:03 am
Posts: 536
Location: Cambridge, UK
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 1:18 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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 ]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 1:39 pm 
Offline
Member
Member
User avatar

Joined: Fri Aug 03, 2007 6:03 am
Posts: 536
Location: Cambridge, UK
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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 4:11 pm 
Offline
Member
Member
User avatar

Joined: Mon Apr 09, 2007 10:50 am
Posts: 49
Location: UK, Hants
http://en.wikipedia.org/wiki/Cross_compiler

Not sure this helps?

_________________
Reflect Desktop Operating System - ' You only remember the name of the OS when it crashes '


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 4:42 pm 
Offline
Member
Member
User avatar

Joined: Sat Apr 21, 2007 7:21 pm
Posts: 127
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 [b]

Thanks to JamesM and BrokenThorn for there tutorials!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 05, 2008 4:47 pm 
Offline
Member
Member
User avatar

Joined: Sat May 05, 2007 3:16 pm
Posts: 216
Location: VA
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

_________________
Kryos Google Page


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 07, 2008 12:37 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7615
Location: Germany
I much prefer talking anyone having a problem with the [wiki]GCC Cross-Compiler[/wiki] 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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], MichaelPetch, SemrushBot [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group