This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Need a crosscompiler to build an OS
- To: Thomas Lenherr <lenherr at netpeople dot ch>
- Subject: Re: Need a crosscompiler to build an OS
- From: <lange92 at 2067 dot resnet dot uni dot edu>
- Date: Fri, 17 Aug 2001 08:53:28 -0500 (CDT)
- cc: <gcc-help at gcc dot gnu dot org>
I don't know how much this might help, but there's a project out there
called the OSKit, http://www.cs.utah.edu/flux/oskit/
and on the site there is documentation for some trivial
multiboot-compliant kernels:
http://www.cs.utah.edu/flux/oskit/examples.html
These examples are in C.
I also highly recommend The OS Resource Center
http://www.nondot.org/sabre/os/articles/
(Keep reading, further commentary below...)
On Fri, 17 Aug 2001, Thomas Lenherr wrote:
> I'm writing a little OS, but right now, everything is written in ASM, so
> it's a _LOT_ of work and that's why I'd like to continue writing in C++. But
> I have some problems starting it.
> time a way to get my OS running from C++ and I found a HOWTO with my
> solution. I've done everything as they said, but it didn't work.
What's the URL?
>
> Could you tell me
> a) what I'm doing wrong (see chosen way below) or
> b) could you tell me a better way (the HOWTO is from '98)?
>
> -------
> My Way
> -------
> In the HOWTO, they said, I need gcc-2.7.2.3. Here a little extract of it:
>
> > Next compile gcc for the i386-unknown-gnu target. Only compile the c and
> c++
> > compilers. The objective c compiler need runtime library which is OS
> specific.
> > silverbolt_27# gunzip -c gcc-2.7.2.3.tar.gz | tar -xf -
> > silverbolt_28# cd gcc-2.7.2.3/
> > silverbolt_29#
> ./configure --target=i386-unknown-gnu --prefix=/usr/local/xdev
> >
> > configure runs
> >
> > silverbolt_30# make LANGUAGES="c c++" LIBGCC=/dev/null
> >
> > make runs
> >
> > silverbolt_31# /usr/local/xdev/386-unknown-gnu/bin/ar rc libgcc2.a
> > silverbolt_32# make LANGUAGES="c c++" LIBGCC=/dev/null install
> >
> > make runs
>
>
> the first execution of make brought up an error, that I have to compile
What was the error? What platform are you developing for (the target)?
What is the linux environment that you're using?
What are the outputs of:
gcc -v (for the GCC that is currently installed that you're using to
build gcc-2.7.2)
as -v (for the version of binutils installed on your system)
Often, you need a specific version of gcc to compile another version (ie,
you may need to find the precompiled linux version of 2.7.2 and install it
to compile 2.7.2, or you may need 2.7.0 or some other such version.)
> libgcc2.a
> for myself, but I don't know why and how.