Porting GCC
- Dandee Yuyo
- Member
- Posts: 47
- Joined: Fri Nov 09, 2007 6:46 pm
- Location: Argentina
Porting GCC
Would it be to complex to port GCC to my OS once it's finished?
Has anyone tried this? Tips? Hints? Suggestions?
I'm also considering SmallC as an option... ...but I do want C++
Has anyone tried this? Tips? Hints? Suggestions?
I'm also considering SmallC as an option... ...but I do want C++
NaN - Not a Nerd
Working on: Physical Memory Management with a 5-lod mipmap XD
Working on: Physical Memory Management with a 5-lod mipmap XD
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
- Dandee Yuyo
- Member
- Posts: 47
- Joined: Fri Nov 09, 2007 6:46 pm
- Location: Argentina
Well, that's why I'm asking for some input, as to have an idea of the implied cost. I read somewhere on this forum that it was easier to port newlib than gcc's libc, so someone might already have done this.
btw, DJ Delorie ported GCC to the Windows platform...
btw, DJ Delorie ported GCC to the Windows platform...
NaN - Not a Nerd
Working on: Physical Memory Management with a 5-lod mipmap XD
Working on: Physical Memory Management with a 5-lod mipmap XD
Hi,
Have you read OS Specific Toolchain? Its worth it if you are considering porting GCC.
Cheers,
Adam[/wiki]
Have you read OS Specific Toolchain? Its worth it if you are considering porting GCC.
Cheers,
Adam[/wiki]
- Dandee Yuyo
- Member
- Posts: 47
- Joined: Fri Nov 09, 2007 6:46 pm
- Location: Argentina
I'm glad you said that, I was thinking I'd have to promote myself againAJ wrote:Have you read OS Specific Toolchain? Its worth it if you are considering porting GCC.
The tutorial linked to will get you as far as creating a cygwin/linux hosted gcc/binutils/newlib that targets your os. Once you have that, you'd need to then use that toolchain to create native apps that actually run on your os. Of course one of these could be gcc, which in theory should compile and run with any standard c library (and you'll have just compiled newlib). Therefore, once you have finished the tutorial, using the same (modified) sources, you should be able to do something like
Code: Select all
../binutils/configure --target=i586-pc-myos --host=i586-pc-myos
Regards,
John.
- Dandee Yuyo
- Member
- Posts: 47
- Joined: Fri Nov 09, 2007 6:46 pm
- Location: Argentina
Yes, you are right Solar. I was particulary referring to this thread:You are probably referring to the glibc, which isn't related to GCC
http://www.osdev.org/phpBB2/viewtopic.php?t=15089
NaN - Not a Nerd
Working on: Physical Memory Management with a 5-lod mipmap XD
Working on: Physical Memory Management with a 5-lod mipmap XD
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
If you've ported a C standard library like Newlib, then it would be easy to get Binutils and GCC up and running.
My OS is Perception.