Page 1 of 1

Porting GCC to Visopsys?

Posted: Sat Feb 23, 2019 12:37 pm
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!

Re: Porting GCC to Visopsys?

Posted: Sat Feb 23, 2019 10:57 pm
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'.

Re: Porting GCC to Visopsys?

Posted: Tue Feb 26, 2019 3:34 pm
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.

Re: Porting GCC to Visopsys?

Posted: Thu Feb 28, 2019 6:06 pm
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.