Porting GCC to Visopsys?

General discussion about Visopsys.
Post Reply
User avatar
ap0r
Posts: 105
Joined: Tue Feb 14, 2012 12:40 am

Porting GCC to Visopsys?

Post by ap0r »

As the title says. It'd be nice to be able to do actual development inside Visopsys!

What is required to do this? I'm willing to do it, but I have no clue even as to where to get started!
Image
Image
User avatar
andymc
Posts: 590
Joined: Tue Nov 16, 2010 7:20 pm

Re: Porting GCC to Visopsys?

Post by andymc »

That would be great, it's been on my wish list for a while, and it would be a good one to have as the first meaty installable package from the new software repository. I think being able to do development would also require a decent editor :-)

It's been a while since I looked at porting gcc, but it's very do-able. The basic steps are, AFAIR:

1. Create some configs/headers/etc within the gcc tree that basically tell it how to build things *for* Visopsys as a 'target' (include/library paths, required compiler and linker options, startup files like crt0.o)
2. Build gcc so you end up with a version that uses the stuff in step #1 - a cross-compiler, with Visopsys as an available target (or the default/only target)
3. Use the gcc from step #2 to build itself again, so the resulting gcc is a Visopsys program that builds Visopsys programs.

The stuff needed for step #1 can be found in the current Visopsys Makefiles, which just uses a standard native Linux gcc to build Visopsys binaries 'manually'.
User avatar
ap0r
Posts: 105
Joined: Tue Feb 14, 2012 12:40 am

Re: Porting GCC to Visopsys?

Post by ap0r »

The devil is in the details as they says. Once I started figuring out what it would actually take to perform those steps, I quietly decided to abandon the project.
Image
Image
User avatar
andymc
Posts: 590
Joined: Tue Nov 16, 2010 7:20 pm

Re: Porting GCC to Visopsys?

Post by andymc »

ap0r wrote: Tue Feb 26, 2019 3:34 pm The devil is in the details as they says. Once I started figuring out what it would actually take to perform those steps, I quietly decided to abandon the project.
Ha! Well, thanks for looking into it :P It will probably be a lot easier for me, once I get around to it. I know all the 'nuts and bolts' that are specific to Visopsys.
Post Reply