comp.lang.ada
 help / color / mirror / Atom feed
From: Mark Lorenzen <mark.lorenzen@gmail.com>
Subject: Re: gnat compiler issues with a partial build
Date: Tue, 9 Jun 2015 06:03:54 -0700 (PDT)
Date: 2015-06-09T06:03:54-07:00	[thread overview]
Message-ID: <ce8c5dea-2e13-460f-9ceb-bd0d7608f9ee@googlegroups.com> (raw)
In-Reply-To: <4bc35d01-158d-48bb-b241-d4e3c3ce4344@googlegroups.com>

On Tuesday, June 9, 2015 at 1:28:01 PM UTC+2, jan.de...@gmail.com wrote:
> On Tuesday, June 9, 2015 at 12:21:28 PM UTC+2, Mark Lorenzen wrote:
> > On Thursday, June 4, 2015 at 1:12:27 PM UTC+2, jan.de...@gmail.com wrote:
> > 
> > > jan@janDell:~/MMS/programs-KERNEL/ec-master/obj$ nm memory_copy.o
> > >                  U __gnat_rcheck_CE_Access_Check
> > > 0000000000000000 T memcpy
> > > 0000000000000000 D memory_copy_E
> > > -------------------------------------
> > > 
> > > They are all related to the Exception machinery and refer to about 4 or 5 symbols in "Ada.Exeptions" in the standard "x86 Linux" runtime.
> > > They are caused by any construct where the compiler suspects that there might be a runtime error under certain conditions. And they have to do with exception propagation I suspect, from looking at a disassembly.
> > > Now in an zfp runtime, any standard runtime references should be switched off in the compiler, or else an alternative should be supplied in the custom runtime. But both ravenscar and zfp (ex Adacore) do not cater for this eventuality.
> > > 
> > > Needless to say that I have been through all exception related pragmas and restrictions. And I did make a 'gnat.adc' file that is duly noted in the project file. So that any pragmas are global.
> > 
> > I don't know what you are trying to achieve, but it seems to me, that you want to build your module with a ZFP run-time that you don't have...
> > 
> > Can you build your module with run-time checks disabled? This should ensure that the access check code is not emitted and therefore does not refer to the undefined symbol __gnat_rcheck_CE_Access_Check.
> > 
> > Regards,
> > 
> > MarkL
> 
> Any simple runtime is easily cooked, when you understand the gnat way of doing things. And yes I could compile with runtime checks disabled. But then there are simpler ways of doing that (like programming in C) 
> The issue seems to me (and I could be mistaken of course) that there is an anomaly in the compiler and/or the gnat ravenscar runtime and/or the documentation. 
> 
> I am posting mostly to jog my own brains and to document a dark corner in the process of kernelmodule building in Ada, since preciously little literature is available. So yes, most definitely thanks for your contribution :) Perhaps the light will shine someday.
> 
> cheers,
> 
> j.

I am using the GNAT Ravenscar runtime library on LEON3 and it works very well and I cannot see that there is any anomaly in the compiler and/or runtime library.

It seems to me that you have cooked your own runtime library (a stripped version of the full runtime library for Linux native) that simply does not provide the subprograms (i.e. symbols) needed. If you choose to compile with runtime checks enabled, then you must of course ensure that your runtime library supports these checks.

Regards,

MarkL

  reply	other threads:[~2015-06-09 13:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04 11:12 gnat compiler issues with a partial build jan.de.kruyf
2015-06-04 19:03 ` Lucretia
2015-06-09  8:11   ` jan.de.kruyf
2015-06-09 10:21 ` Mark Lorenzen
2015-06-09 11:28   ` jan.de.kruyf
2015-06-09 13:03     ` Mark Lorenzen [this message]
2015-06-09 18:57       ` jan.de.kruyf
2015-06-10 10:11         ` Mark Lorenzen
2015-06-10 15:34           ` jan.de.kruyf
2015-06-10 16:59             ` Simon Wright
2015-06-10 17:01               ` Simon Wright
2015-06-10 20:36                 ` jan.de.kruyf
2015-06-11  5:01                   ` Simon Wright
2015-06-11 14:08                     ` jan.de.kruyf
2015-06-11 16:10 ` rrr.eee.27
2015-06-11 19:38   ` Simon Wright
2015-06-12 14:37     ` jan.de.kruyf
2015-06-12 15:05       ` Simon Wright
2015-06-12 15:12         ` jan.de.kruyf
2015-06-12 15:31   ` jan.de.kruyf
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox