From: "Luke A. Guest" <laguest@archeia.com>
To: GCC ML <gcc@gcc.gnu.org>
Subject: Restricted or no run time in Ada
Date: Wed, 02 Jan 2008 19:12:00 -0000 [thread overview]
Message-ID: <1199300892.5983.25.camel@rogue> (raw)
Hi,
I got a simple hello world style multiboot kernel working again recently
and it has got me thinking about how I should be using GNAT.
Basically, I built a cross compiler for binutils and gcc to target
i386-elf (I will be wanting to play with other targets in the future,
e.g. mips-elf, arm-elf, sparc-elf, etc.). This gives me the following
toolset:
i386-elf-addr2line i386-elf-gcc i386-elf-gprof i386-elf-ranlib
i386-elf-ar i386-elf-gcc-4.2.2 i386-elf-ld i386-elf-readelf
i386-elf-as i386-elf-gccbug i386-elf-nm i386-elf-size
i386-elf-c++filt i386-elf-gcov i386-elf-objcopy i386-elf-strings
i386-elf-cpp i386-elf-gnatbind i386-elf-objdump i386-elf-strip
Which is fine enough as I can compile Ada sources with gcc.
Now to get my kernel to compile I originally used pragma No_Run_Time
which is now obsolete. I heard about the Zero Foot Print configurable
runtime but couldn't get it to compile some of the source files and I
couldn't figure out why.
I then tried to use the new Ada 2005 pragma Restrictions and put the
following in my gnat.adc:
-- Basic stuff.
pragma Restrictions(No_Obsolescent_Features);
pragma Restrictions(No_Exceptions);
pragma Restrictions(No_Recursion);
-- Memory management.
pragma Restrictions(No_Allocators);
pragma Restrictions(No_Local_Allocators);
pragma Restrictions(No_Unchecked_Deallocation);
--pragma Restrictions(No_);
-- Make sure we don't have tasking or any of it's features enabled.
pragma Restrictions(Max_Tasks => 0);
pragma Restrictions(No_Protected_Types);
pragma Restrictions(No_Delay);
pragma Restrictions(No_Task_Hierarchy);
pragma Restrictions(No_Abort_Statements);
pragma Restrictions(No_Implicit_Heap_Allocations);
pragma Restrictions(No_Asynchronous_Control);
I'm sure there are more I can use, I'm not sure about that.
Now, AFAIK I'm fairly sure I don't need to use the binder as that will
create a "main" including argc, argv, etc which you don't have in a
kernel (obviously), but I'm sure there are some elaborations that aren't
being done that I *should* have.
I basically want to develop a microkernel that doesn't use the Ada
runtime as an executive, I know this is the usual route, but I don't
want to do that. An Ada runtime on top of my kernel is fine though.
So, am I going the right way about this? Or is there something else I
should be doing? Am I missing pragma's or using them wrong? Should I
really be building a minimal runtime such that I can use Ada minus
exceptions, tasking, etc?
Thanks,
Luke.
next reply other threads:[~2008-01-02 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-02 19:12 Luke A. Guest [this message]
2008-01-04 16:18 ` Luke A. Guest
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1199300892.5983.25.camel@rogue \
--to=laguest@archeia.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).