gcc 3

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
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

gcc 3

Post by df »

I upgraded my cygwin tonight, using the new gcc 3... and none of my code works anymore :( grrrr.... removing "-fwritable-strings" from my makefiles makes things build ok and not crash...

my understanding was "-fwritable-strings" just moved strings into the .data section, without it, it leaves them in the .text section??

I'm not quite sure whats going on yet....
-- Stu --
jrfritz

Re:gcc 3

Post by jrfritz »

I use gcc 3 and everything works ok for me...but I use Linux...and who knows if i'm even using GCC 3 since my linux ( mandrake 9 ) doesn't install correctly because of my bootsector or something being too big.
Aditya

Re:gcc 3

Post by Aditya »

Hi,

Well, since you are said you are using cygwin with GCC 3,
here is my question.
My friend who has already developed one kernel, strongly suggested me to get cygwin (which I did!), and use it to develop microkernel in place of using DJGPP. Nasm for asm code, is perfect, but seems there is problem for DJGPP.

As i know, DJGPP also creats 32 bit code, so why to go for Cygwin? As both are nothing but port of GNU compiler collections?
Please note, I am using Win2k for development.

Regards,
Aditya.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:gcc 3

Post by df »

i'm on win2k as well. cygwin sofar has proved 100% more robust than djgpp.

djgpp will crash on recursion under nt/2k/xp. yuo will often find make dies a horrible death with djgpp on those platforms.

cygwin sofar has proved very solid, no crashes. the current cygwin is very good, so much better than the old cygwin! easy to install + setup as well..
-- Stu --
Tim

Re:gcc 3

Post by Tim »

I'm a great fan of Cygwin, too. I always thought running DJGPP on an NT OS was too much of a hack: NT was emulating a DOS box in protected mode just so that DJGPP could run protected mode inside that DOS box. As a native Win32 app, Cygwin is far more efficient, and therefore faster and more reliable.

However, I can't help with the -fwritable-strings problem though. :(
Aditya

Re:gcc 3

Post by Aditya »

Hi there,

Well, I read your replies, but this discussion what you said seems to be for generating Win32 specific code. Please correct me if I am wrong!
For new operating system development, it matters or no?

Regards,
Aditya.
DarylD

Re:gcc 3

Post by DarylD »

I have to say I use cygwin under Windows 2000 too. I also context for my editor and VMWare for testing. It is a brilliant combination and perfect for my needs.

I do find it really useful to be able to do real work (like come on here!) while I am coding. I just don't don't get on with Linux, too much of a sloth for my likes (and yes, I know its fast, but it seems to struggle too much for me)

Windows NT/2000+ are by and far the best development environments, although they can take a while to boot up if I want to reboot to test my kernel in a *real* computer.

Incidentally, I have been using GCC 3.1+ since I started so I don't know have any problems, sure I will do when I move to GCC 4!
jrfritz

Re:gcc 3

Post by jrfritz »

I ran DGJPP on XP and it didn't crash...
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:gcc 3

Post by Perica »

..
Last edited by Perica on Fri Dec 01, 2006 7:00 pm, edited 1 time in total.
Xeon

Re:gcc 3

Post by Xeon »

DarylD wrote: I just don't don't get on with Linux, too much of a sloth for my likes (and yes, I know its fast, but it seems to struggle too much for me)
Haha, I hear ya man. No, it's a sloth for everybody - some just don't want to admit it. I'm not a n00b, I've used Linux before. Windows isn't open source, and Microsoft's biz strategies aren't all that good either, but Linux just isn't ready for desktop users. Period.

Now, back on topic, I use Cygwin, it's absolutely the greatest. Sure LD still doesn't output ELF formats (I just objcopy), but thats just a minor setback. I use XP (which, by the way, is THE most stable OS I have ever witnessed) and it works wonders. I've been actually considering integrating the Cygwin development environment with Windows through some hacks, but thats another story. MingW, btw, is fine. It's based on an earlier version of Cygwin. You'll find yourself modifying a lot of Unix specific makefiles though for things like cp and rm, but you can make small programs that wrap the DOS commands for things like that. I wonder if any other Linux company cares to take on Redhat and make some Unix tools for Windows...?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:gcc 3

Post by df »

i have put the cygwin version of ld onto my ftp. this outputs elf fine

you just have to add a -mi386bsd switch to ld to get it to output elf correctly otherwise it still gives you the 'pe operatons on non pe file' error..

copy it into the /bin directory.

i use the ld command

ld-all -mi386bsd -X -x -E -e start -Ttext 0x100000 --oformat=elf32-i386

all works fine!

its on my ftp site in pub/operating-systems/ld-all.exe
-- Stu --
DarylD

Re:gcc 3

Post by DarylD »

Beware:

I did that ld-all.exe trick and my code sort of ran but kept popping up GPF at 0x0:0x0 errors.

So I don't trust it although it may work fine for new code.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:gcc 3

Post by df »

strange! i havnt ran into any problems. but it fixed my objcopy problems.... i disassembled my elf kernel, and everything looks ok when compared to it linking as PE.... so.... i guess milage may vary!
-- Stu --
Xeon

Re:gcc 3

Post by Xeon »

I take back whatever I said about Linux.
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:gcc 3

Post by Perica »

..
Last edited by Perica on Fri Dec 01, 2006 7:00 pm, edited 1 time in total.
Post Reply