gcc on non-POSIX os?

Ian Lance Taylor ian@airs.com
Sun Nov 13 04:59:00 GMT 2005


Marco Zanon <info@marcozanon.com> writes:

> Would it be possible to port GCC to a non-POSIX operating system and
> make it work?

Sure.  For example, gcc runs on MS-DOS.

> Or: Suppose I created an operating system kernel. What would I have to
> implement in order for gcc to run on top of it? Would a POSIX-compliant
> libc be necessary?

gcc is a complicated program, but in operating systems terms it is
pretty close to being a filter which reads one file and writes
another.  It does not require much in the way of operating system
support.  It does need most of the ISO C library (fopen, printf,
malloc, etc.).  It also needs to be able to start another process, and
it needs to be able to read a directory.  There may be a couple of
other things here and there.

Ian



More information about the Gcc-help mailing list