This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Configuring for bare hw ia32 PC's


On Tue, 2008-05-13 at 11:06 -0500, Joel Sherrill wrote:

> > No need to have this. I'm going to be implementing my own tasking model,
> > so that when I come to port GNAT to work on top of my kernel, then I'll
> > have full Ada :D
> >   
> Good luck.  Your tasking implementation has to match their
> expectations on semantics or you can get some weird issues.
> I remember them at one point depending on a particular
> way threads got queued in a particular situation where I
> didn't think POSIX was that specific.  And that's a defined
> standard -- not just a random API.
> 
> I'm not saying it can't be done -- just the the Ada run-time
> has its own assumptions and you will have to be careful.

Hmmm, I didn't want to try to implement POSIX, I was just going to do
the "random API" :D

> > There are options that you can set inside system.ads, so I'd have to
> > create a runtime directory in my build tree and copy over the parts I
> > need. I would then modify the system.ads file to say what I want to
> > include in the runtime.
> >   
> You can also put your own system-XXX.ads in the source tree
> if you like.

True, but that involves porting GNAT to bare hw, which is how I started
this thread.

> > I did actually do this already:
> > http://www.archeia.com/an-ada95-hello-world-style-kernel.html
> >
> >   
> Nice so far. 
> 
> FWIW RTEMS is in C. :-D

Thought there was an Ada version? I'm prolly getting mixed up.

> Out of curiousity, how big it your hello world?

When built and unstripped it's 18378 bytes and when stripped it's 5564
bytes. Bit of a difference, eh? But then, it doesn't actually do
anything useful at the moment :D

> > Ah, but I won't be using tasking so it shouldn't generate those either,
> > this is a flag in system.ads as well, IIRC.
> >   
> There are lots of flags in there. :-D

Yup, and there's also the documentation in targparm.ads as well :D

> > Yes, but don't you use gnatmake for your build? This requires a full
> > toolset which you won't get until you've ported GNAT over to your OS for
> > that platform. The way I did it was to use the cross tool i386-elf-gcc
> > and ïi386-elf-gnatbind programs, I then link by hand.
> >
> >   
> Yes we use CPU-rtems-gnatmake for the build.  Just takes
> care to pass in the right -cargs, -largs, etc. 
> 
> I don't see why you can't use gnatmake and gnatbind.  Just
> a matter of getting the arguments right.

Because GNAT doesn't build them for these targets (x86_64-unknown-elf
and mips-unknown-elf), you need OS support and therefore a runtime. 

Thanks,
Luke.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]